File tree Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Original file line number Diff line number Diff line change 11name : Publish npm
22on :
33 push :
4+ branches :
5+ - master
46 tags :
5- - v0.**
7+ - ' v0.**'
68
79jobs :
810 publish :
911 runs-on : ubuntu-latest
1012 steps :
11- - uses : actions/checkout@v1
12- - uses : actions/setup-node@v1
13+ - uses : actions/checkout@v3
14+ - uses : actions/setup-node@v3
1315 with :
14- node-version : 16
16+ node-version : ' 16.x'
17+ registry-url : ' https://registry.npmjs.org'
1518 - run : yarn
16- - run : npm test
17- - run : npm run build
18- - uses : JS-DevTools/npm-publish@v1
19- with :
20- token : ${{ secrets.NPM_TOKEN }}
19+ - run : yarn test
20+ - run : yarn build
21+
22+ - name : Beta
23+ if : ${{ contains(github.ref, '-beta') }}
24+ run : yarn publish --tag beta
25+ env :
26+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
27+
28+ - name : Current version
29+ if : ${{ !contains(github.ref, '-beta') }}
30+ run : yarn publish
31+ env :
32+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments