Skip to content

Commit

Permalink
ci: only build release if files have changed
Browse files Browse the repository at this point in the history
  • Loading branch information
gmasse committed Sep 28, 2023
1 parent c8de5a4 commit 8b3dfa7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,32 @@ on:
concurrency: build-${{ github.ref }}

jobs:
check-files-changed:
runs-on: ubuntu-latest
outputs:
any_modified: ${{ steps.changed-files.outputs.any_modified }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: tj-actions/changed-files@v39
id: changed-files
with:
files: yf_stock_ticker/**
- name: List all modified files
run: |
for file in ${{ steps.changed-files.outputs.all_modified_files }}; do
echo "$file was changed"
done
test:
needs: check-files-changed
if: needs.check-files-changed.outputs.any_modified == 'true'
name: Lint and test
uses: gmasse/xbar-plugin-yf-stock-ticker/.github/workflows/ci.yml@main

build:
needs: test
runs-on: macos-latest
permissions:
contents: write
Expand Down

0 comments on commit 8b3dfa7

Please sign in to comment.