Skip to content

Commit 0f82588

Browse files
authored
Merge pull request #112 from radiovisual/auto-version-bump-pr
ci: open a PR with version bump after successful publish.
2 parents bbf3e17 + 45ec7f3 commit 0f82588

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
10-
- uses: actions/setup-node@v3
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-node@v4
1111
with:
12-
node-version: '16.x'
12+
node-version: '18.x'
1313
registry-url: 'https://registry.npmjs.org'
1414
- run: git config --global user.email "wuergler@gmail.com"
1515
- run: git config --global user.name "Michael Wuergler"
@@ -21,3 +21,15 @@ jobs:
2121
- run: npm publish
2222
env:
2323
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24+
25+
# This step will only run if all previous steps have succeeded
26+
- name: Create Pull Request for Version Bump
27+
if: success()
28+
uses: peter-evans/create-pull-request@v6
29+
with:
30+
commit-message: Update package version
31+
title: 'chore: update package version to ${{ env.RELEASE_VERSION }}'
32+
body: 'Updates `package.json` version to `${{ env.RELEASE_VERSION }}`.'
33+
branch: version-bump/${{ env.RELEASE_VERSION }}
34+
labels: version-bump
35+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)