File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -24,28 +24,23 @@ jobs:
2424 - name : " Install dependencies"
2525 run : npm ci
2626
27- - name : " Add node_modules/.bin to PATH"
28- run : echo "$(npm bin)" >> $GITHUB_PATH
29-
3027 - name : " Run tests"
3128 run : npm test
3229
30+ - name : " Get version from package.json"
31+ id : get_version
32+ run : echo "version=v$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
33+
3334 - name : " Set Git user name and email"
3435 run : |
3536 git config --global user.name "github-actions"
3637 git config --global user.email "[email protected] " 37-
38- - name : " Bump patch version"
39- run : npm version patch
4038
41- - name : " Get new version"
42- id : get_version
43- run : echo "version=v$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
39+ - name : " Create Git tag for version"
40+ run : git tag ${{ steps.get_version.outputs.version }}
4441
45- - name : " Push version bump commit and tag"
46- run : |
47- git push origin HEAD
48- git push origin --tags
42+ - name : " Push tag to origin"
43+ run : git push origin ${{ steps.get_version.outputs.version }}
4944
5045 - name : " Publish to NPM"
5146 run : npm publish --access public
6358 • Published by ${{ github.actor }}
6459 ```
6560 env :
66- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments