File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish NPM Package
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+ workflow_call :
9+ secrets :
10+ NPM_TOKEN :
11+ required : true
12+ GH_TOKEN :
13+ required : true
14+
15+ jobs :
16+ npm-publish :
17+ runs-on : ubuntu-latest
18+
19+ strategy :
20+ fail-fast : true
21+
22+ steps :
23+ - uses : actions/checkout@v2
24+
25+ - name : Setup Node.js 16
26+ uses : actions/setup-node@v2
27+ with :
28+ node-version : " 16.x"
29+
30+ - run : git config user.email "scottwestover2006@gmail.com"
31+ - run : git config user.name "@github-ci"
32+ - run : yarn version --patch --message "Bump version to %s"
33+
34+ - run : git push
35+ - run : git push --follow-tags
36+
37+ - name : publish to npm
38+ run : |
39+ npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
40+ npm run publish:npm
41+
42+ - name : publish to github
43+ run : |
44+ npm config set registry https://npm.pkg.github.com
45+ npm set //npm.pkg.github.com/:_authToken ${{ secrets.GH_TOKEN }}
46+ npm run publish:github
You can’t perform that action at this time.
0 commit comments