File tree 2 files changed +29
-5
lines changed
2 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : Build and Publish plugin
2
2
on :
3
- release :
4
- types : [published]
3
+ push :
4
+ paths-ignore :
5
+ - ' LICENSE'
6
+
7
+
5
8
jobs :
6
- build :
9
+ Publish :
10
+ name : Publish
11
+ if : startsWith(github.ref, 'refs/tags')
7
12
runs-on : ubuntu-latest
8
13
steps :
9
14
- name : Checkout
10
15
uses : actions/checkout@v2
16
+ with :
17
+ fetch-depth : 0
18
+
11
19
- name : Setup Node
12
20
uses : actions/setup-node@v2
13
21
with :
14
22
node-version : ' 16.x'
15
23
registry-url : ' https://registry.npmjs.org'
24
+
16
25
- 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
+
18
42
- name : Publish on NPM 📦
19
43
run : npm publish
20
44
env :
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " docsify-plugin-meting-api" ,
3
- "version" : " 0 .0.0" ,
3
+ "version" : " 1 .0.0" ,
4
4
"description" : " A docsify.js plugin for meting-api." ,
5
5
"author" : " lisuke" ,
6
6
"license" : " MIT" ,
You can’t perform that action at this time.
0 commit comments