Skip to content

Commit 5a15421

Browse files
committed
Commit version change and move tag
1 parent 60551fc commit 5a15421

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/Publish_to_NPM.yml

+19-1
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,28 @@ jobs:
2626
run: npm run build
2727

2828
- run: npm version ${{ github.event.release.tag_name }} --git-tag-version=false
29-
if: ${{ github.event.action }} == 'prereleased'
3029

3130
- name: Test publishing to NPM
3231
if: ${{ github.event.action }} == 'prereleased'
3332
run: npm publish --dry-run
3433
env:
3534
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35+
36+
- name: Publish to NPM
37+
if: ${{ github.event.action }} == 'released'
38+
run: npm publish --dry-run
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
42+
- name: Bump version in git
43+
if: ${{ github.event.action }} == 'released'
44+
run: |
45+
git add package.json
46+
git add package-lock.json
47+
git commit -m "Bump version to ${{ github.event.release.tag_name }}"
48+
git tag -f ${{ github.event.release.tag_name }}
49+
git push
50+
git push origin -f ${{ github.event.release.tag_name }}
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+

0 commit comments

Comments
 (0)