Commit 7a6fac9 1 parent 96bcf2b commit 7a6fac9 Copy full SHA for 7a6fac9
File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : publish npm
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - v*.*.*
7
+ workflow_dispatch :
8
+
9
+ permissions :
10
+ contents : write
11
+
12
+ jobs :
13
+ publish-npm :
14
+ runs-on : ubuntu-22.04
15
+ steps :
16
+ - uses : actions/checkout@v3
17
+ - uses : actions/setup-node@v3
18
+ with :
19
+ node-version : 16
20
+ registry-url : https://registry.npmjs.org/
21
+ - name : Get version
22
+ id : get_version
23
+ run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
24
+ - name : Set version
25
+ run : |
26
+ sudo apt install jq
27
+ jq '.version="${{ steps.get_version.outputs.VERSION }}"' package.json > package.json.new
28
+ mv package.json.new package.json
29
+ - name : Generate SDK
30
+ run : |
31
+ npm cache clean --force
32
+ npm install @openapitools/openapi-generator-cli -g
33
+ make build
34
+ - run : bash generate-npm.sh
35
+ env :
36
+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
You can’t perform that action at this time.
0 commit comments