-
Notifications
You must be signed in to change notification settings - Fork 118
57 lines (51 loc) · 1.49 KB
/
release.yml
File metadata and controls
57 lines (51 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build Release Binaries
on:
release:
types: [created, published, edited]
jobs:
build:
name: Build for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: agentapi
asset_name: agentapi-linux-amd64
goarch: amd64
goos: linux
- os: macos-latest
artifact_name: agentapi
asset_name: agentapi-darwin-amd64
goarch: amd64
goos: darwin
- os: macos-latest
artifact_name: agentapi
asset_name: agentapi-darwin-arm64
goarch: arm64
goos: darwin
- os: windows-latest
artifact_name: agentapi.exe
asset_name: agentapi-windows-amd64.exe
goarch: amd64
goos: windows
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: go build -v -o ${{ matrix.artifact_name }} .
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
asset_content_type: application/octet-stream