Skip to content

Commit eb2f58b

Browse files
committed
Refactor workflow to include patch version bump
1 parent b0f2d01 commit eb2f58b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,16 @@ jobs:
3232
git config --global user.name "github-actions"
3333
git config --global user.email "[email protected]"
3434
35-
- name: "Get version"
35+
- name: "Bump patch version"
36+
run: npm version patch
37+
38+
- name: "Get new version"
3639
id: get_version
3740
run: echo "version=v$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
3841

39-
- name: "Push tags"
42+
- name: "Push version bump commit and tag"
4043
run: |
41-
git tag ${{ steps.get_version.outputs.version }}
44+
git push origin HEAD
4245
git push origin --tags
4346
4447
- name: "Publish to NPM"

0 commit comments

Comments
 (0)