-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (39 loc) · 1.23 KB
/
build.yml
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
name: Build
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.21"]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Build ARM64
run: GOOS=linux GOARCH=arm64 go build -o vitoagent_arm64 ./cmd/agent.go
- name: Build AMD64
run: GOOS=linux GOARCH=amd64 go build -o vitoagent_amd64 ./cmd/agent.go
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./vitoagent_arm64
asset_name: vitoagent_arm64
asset_content_type: application/octet-stream
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./vitoagent_amd64
asset_name: vitoagent_amd64
asset_content_type: application/octet-stream