File tree Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 11name : Build and Publish plugin
22on :
3- release :
4- types : [published]
3+ push :
4+ paths-ignore :
5+ - ' LICENSE'
6+
7+
58jobs :
6- build :
9+ Publish :
10+ name : Publish
11+ if : startsWith(github.ref, 'refs/tags')
712 runs-on : ubuntu-latest
813 steps :
914 - name : Checkout
1015 uses : actions/checkout@v2
16+ with :
17+ fetch-depth : 0
18+
1119 - name : Setup Node
1220 uses : actions/setup-node@v2
1321 with :
1422 node-version : ' 16.x'
1523 registry-url : ' https://registry.npmjs.org'
24+
1625 - name : Install dependencies and build 🔧
17- run : npm ci
26+ run : |
27+ jq '.version="'$(git describe --tags)'"' package.json > package.json.new
28+ mv package.json.new package.json
29+ npm i
30+
31+ - name : Upload to Github
32+ if : startsWith(github.ref, 'refs/tags')
33+ uses : svenstaro/upload-release-action@v2
34+ with :
35+ repo_token : ${{ secrets.TOKEN }}
36+ file : dist/*
37+ tag : ${{ github.ref }}
38+ release_name : ${{ github.ref }}
39+ overwrite : true
40+ file_glob : true
41+
1842 - name : Publish on NPM 📦
1943 run : npm publish
2044 env :
Original file line number Diff line number Diff line change 11{
22 "name" : " docsify-plugin-meting-api" ,
3- "version" : " 0 .0.0" ,
3+ "version" : " 1 .0.0" ,
44 "description" : " A docsify.js plugin for meting-api." ,
55 "author" : " lisuke" ,
66 "license" : " MIT" ,
You can’t perform that action at this time.
0 commit comments