-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.04 KB
/
go_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
name: Go release builder
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1.20
- name: Build amd64
run: cd app && go get main && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags '-s -w -extldflags "-static"' -o monitor-amd64
- name: Build arm
run: cd app && go get main && CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -a -tags netgo -ldflags '-s -w -extldflags "-static"' -o monitor-arm
- name: Build arm64
run: cd app && go get main && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -tags netgo -ldflags '-s -w -extldflags "-static"' -o monitor-arm64
- name: Build release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
app/monitor-amd64
app/monitor-arm
app/monitor-arm64