Skip to content

Commit

Permalink
Ensure package.json version has been bumped
Browse files Browse the repository at this point in the history
Checks to ensure that the version in `package.json` has been bumped
  • Loading branch information
scruplelesswizard authored Dec 9, 2023
1 parent fd37e22 commit 2f8bde8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,19 @@ jobs:

- name: Build Package
run: pnpm build

- name: Check if version has been updated
id: check-version-changed
uses: EndBug/version-check@v2
with:
diff-search: true

- name: Log when changed
if: steps.check-version-changed.outputs.changed == 'true'
run: echo "Version change found in commit ${{ steps.check.outputs.commit }}! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"

- name: Log when unchanged
if: steps.check-version-changed.outputs.changed == 'false'
run: |
echo "No version change. Please update the package version in package.json"
exit 1

0 comments on commit 2f8bde8

Please sign in to comment.