File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : NPM Publish
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " *.*.*"
7
+
8
+ jobs :
9
+ publish :
10
+ runs-on : ubuntu-22.04
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v3
14
+ with :
15
+ fetch-depth : 0
16
+
17
+ - name : Set version variable
18
+ id : vars
19
+ run : |
20
+ APP_VERSION=${GITHUB_REF#refs/tags/}
21
+ echo "version: [$APP_VERSION]"
22
+ echo "{version}={$APP_VERSION}" >> $GITHUB_OUTPUT
23
+
24
+ - name : Set version in package.json
25
+ uses : actions/setup-node@v3
26
+ with :
27
+ node-version : " 16.x"
28
+ registry-url : " https://registry.npmjs.org"
29
+ - run : yarn version --new-version $APP_VERSION --no-git-tag-version
30
+ env :
31
+ APP_VERSION : ${{ steps.vars.outputs.version }}
32
+
33
+ - name : Publish
34
+ run : npm publish
35
+ env :
36
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
37
+
38
+ # vim:ft=yaml:et:ts=2:sw=2
You can’t perform that action at this time.
0 commit comments