File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed
Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1- name : node.js
1+ name : Build
22
33on : [ push, pull_request ]
44
Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ release :
5+ # Only use the types keyword to narrow down the activity types that will trigger your workflow.
6+ types : [published, created, edited]
7+
8+ jobs :
9+ Release :
10+ name : Publish
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v2
15+
16+ - name : Use Node.js ${{ env.NODE_VERSION }}
17+ uses : actions/setup-node@v1
18+ with :
19+ node-version : ${{ env.NODE_VERSION }}
20+
21+ - uses : actions/cache@v2
22+ with :
23+ path : ~/.npm
24+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
25+ restore-keys : |
26+ ${{ runner.os }}-node-
27+ - name : npm install
28+ run : npm install
29+ - name : npm build
30+ run : GENERATE_SOURCEMAP=false npm run build
31+
32+ - uses : montudor/action-zip@v1
33+ with :
34+ args : zip -qq -r www.zip build
35+
36+ - name : Upload builds to release
37+ uses : svenstaro/upload-release-action@v1-release
38+ with :
39+ repo_token : ${{ secrets.GITHUB_TOKEN }}
40+ file : www.zip
41+ tag : ${{ github.ref }}
42+ asset_name : www.zip
43+ overwrite : true
You can’t perform that action at this time.
0 commit comments