File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Release Binaries
2+
3+ on :
4+ release :
5+ types : [created, published, edited]
6+
7+ jobs :
8+ build :
9+ name : Build for ${{ matrix.os }}
10+ runs-on : ${{ matrix.os }}
11+ strategy :
12+ matrix :
13+ include :
14+ - os : ubuntu-latest
15+ artifact_name : agentapi
16+ asset_name : agentapi-linux-amd64
17+ goarch : amd64
18+ goos : linux
19+ - os : macos-latest
20+ artifact_name : agentapi
21+ asset_name : agentapi-darwin-amd64
22+ goarch : amd64
23+ goos : darwin
24+ - os : macos-latest
25+ artifact_name : agentapi
26+ asset_name : agentapi-darwin-arm64
27+ goarch : arm64
28+ goos : darwin
29+ - os : windows-latest
30+ artifact_name : agentapi.exe
31+ asset_name : agentapi-windows-amd64.exe
32+ goarch : amd64
33+ goos : windows
34+
35+ steps :
36+ - uses : actions/checkout@v4
37+
38+ - name : Set up Go
39+ uses : actions/setup-go@v5
40+ with :
41+ go-version : ' stable'
42+
43+ - name : Build
44+ env :
45+ GOOS : ${{ matrix.goos }}
46+ GOARCH : ${{ matrix.goarch }}
47+ run : go build -v -o ${{ matrix.artifact_name }} .
48+
49+ - name : Upload Release Asset
50+ uses : actions/upload-release-asset@v1
51+ env :
52+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53+ with :
54+ upload_url : ${{ github.event.release.upload_url }}
55+ asset_path : ./${{ matrix.artifact_name }}
56+ asset_name : ${{ matrix.asset_name }}
57+ asset_content_type : application/octet-stream
You can’t perform that action at this time.
0 commit comments