File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed
Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build App
2+
3+ on :
4+ push :
5+ branches :
6+ - autobuild3
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+ with :
16+ ref : autobuild3
17+
18+ - name : Setup Go
19+ uses : actions/setup-go@v5
20+ with :
21+ go-version : ' 1.21.x'
22+
23+ - name : Install dependencies
24+ run : go get .
25+
26+ - name : Build
27+ run : |
28+ chmod +x ./build.sh
29+ ./build.sh
30+
31+ - name : Upload builds
32+ uses : svenstaro/upload-release-action@v2
33+ with :
34+ repo_token : ${{ secrets.GITHUB_TOKEN }}
35+ file : ./bin/anchor-*
36+ file_glob : true
37+ tag : ${{ github.ref }}
38+ target_commit : autobuild3
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # build for all platforms
4+ platforms=(" windows/amd64" " linux/amd64" " darwin/amd64" " darwin/arm64" " linux/arm64" " windows/arm64" )
5+ for platform in " ${platforms[@]} " ; do
6+ GOOS=${platform%/* }
7+ GOARCH=${platform#*/ }
8+ env GOOS=$GOOS GOARCH=$GOARCH go build -o ./bin/anchor-$GOOS -$GOARCH .
9+ done
You can’t perform that action at this time.
0 commit comments