Skip to content

Commit

Permalink
Merge pull request #78 from scruplelesswizard/check-for-version-change
Browse files Browse the repository at this point in the history
Ensure `package.json` version has been bumped
  • Loading branch information
thebentern authored Dec 10, 2023
2 parents fd37e22 + 2f8bde8 commit 4912930
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 4912930

Please sign in to comment.