diff options
| author | Kevin Hoerr <kjhoerr@protonmail.com> | 2022-12-28 12:23:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-28 12:23:56 -0500 |
| commit | 338cf37a18f7176e0ee27c0a6ca66be09695521a (patch) | |
| tree | d720afd38ada4beae57ed76dbfbd55ef0c17a013 /.github | |
| parent | 1e698cdfa2f87dcea12c89de574c974f3f272ea7 (diff) | |
| download | submelon.dev-338cf37a18f7176e0ee27c0a6ca66be09695521a.tar.gz submelon.dev-338cf37a18f7176e0ee27c0a6ca66be09695521a.tar.bz2 submelon.dev-338cf37a18f7176e0ee27c0a6ca66be09695521a.zip | |
Skip version update if source files unchanged (#53)
* Skip version update if source files unchanged
* fix path
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build.yml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62e11ed..c3137f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,15 +22,25 @@ jobs: cache: 'npm' - name: Install Node.js packages run: npm ci + - name: Get current date id: date run: echo "::set-output name=date::$(date +'%s')" + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + source: + - 'src/**' + # modify version number if actual source files changed - name: Modify version number uses: mingjun97/file-regex-replace@v1 + if: steps.filter.outputs.source == "true" with: regex: 'version: "[0-9]*",' replacement: 'version: "${{ steps.date.outputs.date }}",' include: 'gatsby-config\.ts' + - name: Clean Gatsby cache run: npm run clean - name: Run Gatsby Build |
