File tree Expand file tree Collapse file tree 1 file changed +25
-4
lines changed
Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Original file line number Diff line number Diff line change 22
33name : CI
44
5- # Controls when the action will run.
5+ # Controls when the action will run.
66on :
77 # Triggers the workflow on push or pull request events but only for the v2 branch
88 push :
99 branches : [ v2 ]
1010 pull_request :
1111 branches : [ v2 ]
12+ create :
13+ tags :
14+ - v*
1215
1316 # Allows you to run this workflow manually from the Actions tab
1417 workflow_dispatch :
@@ -24,16 +27,24 @@ jobs:
2427 steps :
2528 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2629 - uses : actions/checkout@v2
27-
30+
2831 - name : Setup Node.js environment
29323033 with :
3134 # Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0
3235 node-version : 14.x
33-
36+
37+ - name : Cache node modules
38+ uses : actions/cache@v2
39+ env :
40+ cache-name : cache-node-modules
41+ with :
42+ path : node_modules
43+ key : ${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
44+
3445 - name : npm install
3546 run : npm install
36-
47+
3748 - name : build
3849 run : npm run build:demo
3950
4556 host : monibuca.com
4657 username : root
4758 privateKey : ${{ secrets.PEM }}
59+
60+ - name : zip
61+ if : startsWith(github.ref, 'refs/tags/')
62+ run : zip -r ./demo.zip demo/public/*
63+
64+ - name : Release
65+ uses : softprops/action-gh-release@v1
66+ if : startsWith(github.ref, 'refs/tags/')
67+ with :
68+ files : " demo.zip"
You can’t perform that action at this time.
0 commit comments