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:
24
24
- name : " Install dependencies"
25
25
run : npm ci
26
26
27
- - name : " Add node_modules/.bin to PATH"
28
- run : echo "$(npm bin)" >> $GITHUB_PATH
29
-
30
27
- name : " Run tests"
31
28
run : npm test
32
29
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
+
33
34
- name : " Set Git user name and email"
34
35
run : |
35
36
git config --global user.name "github-actions"
36
37
git config --global user.email "[email protected] "
37
-
38
- - name : " Bump patch version"
39
- run : npm version patch
40
38
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 }}
44
41
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 }}
49
44
50
45
- name : " Publish to NPM"
51
46
run : npm publish --access public
63
58
• Published by ${{ github.actor }}
64
59
```
65
60
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