File tree Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ # on:
2+ # push:
3+ # tags:
4+ # - 'v*'
5+ on : [push]
6+
7+ name : Build&Release
8+
9+ jobs :
10+ build :
11+ name : Build release
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v2
16+ with :
17+ submodules : recursive
18+
19+ - name : Setup Go
20+ uses : actions/setup-go@v2
21+ with :
22+ go-version : ^1.16
23+
24+ - name : Setup Node.js
25+ uses : actions/setup-node@v1
26+ with :
27+ node-version : ' 14.x'
28+
29+ - name : Build static
30+ run : cd web && yarn && yarn build && cd ../
31+
32+ - name : Get Go dependencies
33+ run : go mod download && go get -u github.com/rakyll/statik
34+
35+ - name : Static->GO generation
36+ run : statik --src=web/build
37+
38+ - name : Build
39+ run : make
40+ - uses : actions/upload-artifact@v2
41+ with :
42+ name : build-artifact
43+ path : ssh-web-console-*
44+
45+ release :
46+ name : On Release
47+ needs : build
48+ runs-on : ubuntu-latest
49+ steps :
50+ - uses : actions/download-artifact@v2
51+ with :
52+ name : build-artifact
53+ - run : ls -R
54+
55+ - name : Release
56+ uses : softprops/action-gh-release@v1
57+ if : startsWith(github.ref, 'refs/tags/')
58+ with :
59+ files : |
60+ ssh-web-console-linux-amd64
61+ ssh-web-console-linux-arm64
62+ ssh-web-console-darwin-amd64
63+ ssh-web-console-windows-amd64.exe
64+ env :
65+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments