@@ -3,56 +3,18 @@ name: release
33on : [push]
44
55jobs :
6- install :
6+ release :
77 runs-on : ubuntu-latest
8- if : " ! contains(github.event.head_commit.message, '[skip ci]')"
8+ if : " github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, '[ci skip]') && ! contains(github.event.head_commit.message, '[skip ci]')"
99 steps :
10- - uses : actions/checkout@v1
11- - uses : actions/setup-node@v1
10+ - uses : actions/checkout@v2
11+ - uses : actions/setup-node@v2
1212 with :
13- node-version : 12
13+ node-version : 14
1414 - uses : actions/cache@v1
1515 with :
1616 path : node_modules
1717 key : react-editor-js-${{ hashFiles('**/yarn.lock') }}
18- - run : npm install -g yarn
1918 - run : yarn
20-
21- build :
22- needs : install
23- runs-on : ubuntu-latest
24- steps :
25- - uses : actions/checkout@v1
26- - uses : actions/setup-node@v1
27- with :
28- node-version : 12
29- - uses : actions/cache@v1
30- with :
31- path : node_modules
32- key : react-editor-js-${{ hashFiles('**/yarn.lock') }}
3319 - run : yarn build
34- - uses : actions/upload-artifact@v1
35- with :
36- name : dist
37- path : dist
38-
39- publish :
40- needs : build
41- runs-on : ubuntu-latest
42- if : github.ref == 'refs/heads/master'
43- steps :
44- - uses : actions/checkout@v1
45- - uses : actions/setup-node@v1
46- with :
47- node-version : 12
48- - uses : actions/cache@v1
49- with :
50- path : node_modules
51- key : react-editor-js-${{ hashFiles('**/yarn.lock') }}
52- - uses : actions/download-artifact@v1
53- with :
54- name : dist
55- - run : npx semantic-release --extends
56- env :
57- GITHUB_TOKEN : ${{secrets.GITHUB_ACCESS_TOKEN}}
58- NPM_TOKEN : ${{secrets.NPM_ACCESS_TOKEN}}
20+ - run : yarn release --ci
0 commit comments