Skip to content

Commit

Permalink
move version bump to its own yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunter275 committed Aug 29, 2024
1 parent 8d0e3f8 commit f165d57
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
24 changes: 1 addition & 23 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,4 @@ jobs:
run: pnpm install

- name: Build Package
run: pnpm build
version-check:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Check if version has been updated
if:
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
run: pnpm build
28 changes: 28 additions & 0 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Version Bump'

on: pull_request
branches:
- 'master'

jobs:
version-check:
needs: build
runs-on: ubuntu-latest
steps:
- name: Check if version has been updated
if:
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 f165d57

Please sign in to comment.