File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build/release
2+
3+ on :
4+ workflow_dispatch :
5+
6+ push :
7+ tags :
8+ - " *"
9+
10+ jobs :
11+ release :
12+ runs-on : macos-latest
13+
14+ steps :
15+ - name : Check out Git repository
16+ uses : actions/checkout@v2
17+
18+ - name : Install Node.js, NPM and Yarn
19+ uses : actions/setup-node@v1
20+ with :
21+ node-version : " 16.x"
22+
23+ - name : Get yarn cache
24+ id : yarn-cache
25+ run : echo "::set-output name=dir::$(yarn cache dir)"
26+
27+ - name : Cache dependencies
28+ uses : actions/cache@v1
29+ with :
30+ path : ${{ steps.yarn-cache.outputs.dir }}
31+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
32+ restore-keys : |
33+ ${{ runner.os }}-yarn-
34+
35+ - name : Install dependencies
36+ run : yarn install --frozen-lockfile
37+
38+ - name : Install golang
39+ uses : actions/setup-go@v2
40+ with :
41+ go-version : " ^1.17.6"
42+
43+ - name : Build
44+ run : |
45+ go get
46+ yarn build
47+
48+ - name : Create archives
49+ working-directory : ./dist
50+ run : |
51+ for i in *; do zip -r "${i%/}.zip" "$i"; done
52+
53+ - name : Upload binaries to release
54+ uses : svenstaro/upload-release-action@v2
55+ with :
56+ repo_token : ${{ secrets.GITHUB_TOKEN }}
57+ file : dist/*.zip
58+ file_glob : true
59+ tag : ${{ github.ref }}
60+ overwrite : true
You can’t perform that action at this time.
0 commit comments