File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ workflow_dispatch :
5+ release :
6+ types : [published]
7+ push :
8+ branches : [ main ]
9+ pull_request :
10+ branches : [ main ]
11+
12+ jobs :
13+ deploy :
14+
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v2
19+
20+ - name : Initialize development environment
21+ run : npm install
22+
23+ - name : Release package
24+ run : npm run release
25+ env :
26+ NPM_TOKEN : ${{ secrets.NPM_API_TOKEN }}
27+ if : ( github.event_name == 'release' && github.event.action == 'published' ) || github.event_name == 'workflow_dispatch'
28+
29+ - name : Upload package
30+ run : |
31+ gh auth login --with-token ${{ secrets.GITHUB_TOKEN }}
32+ gh release upload ${{ github.event.release.tag_name }} build/*tgz --clobber
33+ if : ( github.event_name == 'release' && github.event.action == 'published' ) || github.event_name == 'workflow_dispatch'
Original file line number Diff line number Diff line change 1313 "check" : " npm-run-all check-prettier check-eslint" ,
1414 "docs" : " npx jsdoc -d docs -r README.md ./src/*js" ,
1515 "rollup" : " rollup -c" ,
16- "pack" : " mkdir -p build && npm pack --pack-destination build && tar -ztvf build/*.tgz"
16+ "pack" : " mkdir -p build && npm pack --pack-destination build && tar -ztvf build/*.tgz" ,
17+ "release" : " npm-run-all rollup pack && npm publish"
1718 },
1819 "repository" : {
1920 "type" : " git" ,
You can’t perform that action at this time.
0 commit comments