File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish on Release
2
+
3
+ on :
4
+ release :
5
+ types :
6
+ - published
7
+
8
+ jobs :
9
+ publish :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Checkout
14
+ uses : actions/checkout@v4
15
+ with :
16
+ ref : master
17
+
18
+ - uses : actions/setup-node@v4
19
+ with :
20
+ node-version : 20
21
+ registry-url : ' https://registry.npmjs.org'
22
+
23
+ - name : Get Release Tag
24
+ run : echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
25
+
26
+ - name : Set git user
27
+ run : |
28
+ git config user.name github-actions
29
+ git config user.email github-actions@github.com
30
+
31
+ - name : Set version ${{ env.tag }}
32
+ run : |
33
+ npm version ${{ env.tag }}
34
+ git push
35
+
36
+ - name : Publish
37
+ run : npm publish --access public
38
+ env :
39
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments