File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Releases
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+ # branches: [master]
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+ - uses : actions/setup-node@v1
14+ with :
15+ node-version : " 12.x"
16+ - run : yarn install --frozen-lockfile
17+ - run : yarn build
18+ - run : yarn pack --filename=release.tgz
19+ - uses : Klemensas/action-autotag@stable
20+ id : update_tag
21+ with :
22+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
23+ tag_prefix : " v"
24+ - name : Publish on NPM
25+ uses : JS-DevTools/npm-publish@v1
26+ with :
27+ package : build
28+ - name : Create Release
29+ if : steps.update_tag.outputs.tagname
30+ uses : actions/create-release@v1
31+ id : create_release
32+ env :
33+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ with :
35+ tag_name : ${{ steps.update_tag.outputs.tagname }}
36+ release_name : Release ${{ steps.update_tag.outputs.tagname }}
37+ - name : Upload Release Asset
38+ if : steps.update_tag.outputs.tagname
39+ id : upload-release-asset
40+ uses : actions/upload-release-asset@v1
41+ env :
42+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43+ with :
44+ upload_url : ${{ steps.create_release.outputs.upload_url }}
45+ asset_path : ./package.tgz
46+ asset_name : package.tgz
47+ asset_content_type : application/tgz
You can’t perform that action at this time.
0 commit comments