Skip to content

Commit

Permalink
feat: fail deployment if package.json version not incremented
Browse files Browse the repository at this point in the history
  • Loading branch information
tquin committed Nov 24, 2024
1 parent 584924f commit 1d9d5bf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/publish-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'

deploy:
needs: build
runs-on: ubuntu-latest
Expand All @@ -42,6 +42,16 @@ jobs:
with:
node-version: 18.x

- id: version-updated
uses: MontyD/package-json-updated-action
with:
path: package.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- if: ${{ ! steps.version-updated.outputs.has-updated }}
run: exit 1

- run: npm install

- name: Publish
Expand Down

0 comments on commit 1d9d5bf

Please sign in to comment.