File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Package to npmjs
2
+ on :
3
+ push :
4
+ tags :
5
+ - " v*"
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v3
12
+ with :
13
+ fetch-depth : 0
14
+ - uses : actions/setup-node@v3
15
+ with :
16
+ node-version : " 20.x"
17
+ registry-url : " https://registry.npmjs.org"
18
+ - name : Config Git
19
+ run : |
20
+ git config user.name github-actions
21
+ git config user.email github-actions@github.com
22
+ - name : Update version in package.json
23
+ run : |
24
+ VERSION=${GITHUB_REF#refs/tags/v}
25
+ npm version $VERSION --no-git-tag-version
26
+ - name : Commit package.json changes
27
+ run : |
28
+ git add package.json
29
+ git commit -m "Bump version to ${GITHUB_REF#refs/tags/v}"
30
+ git push
31
+ - run : npm ci
32
+ - run : npm run build
33
+ - run : npm publish
34
+ env :
35
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments