-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 840 Bytes
/
go.yml
File metadata and controls
38 lines (31 loc) · 840 Bytes
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
name: Go
on:
push:
tags:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.25
- name: Build
run: |
versionflags="-X main.appVersion=${{ github.ref_name }}"
for GOOS in linux; do
for GOARCH in amd64 arm64; do
export GOOS GOARCH
CGO_ENABLED=0 go build -v -a -tags netgo -ldflags="-extldflags '-static' -s -w $versionflags" -o build/osctl-${GOOS}-${GOARCH} cmd/main.go
done
done
cd build; sha256sum * > sha256sums.txt
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
token: ${{ secrets.GITHUB_TOKEN }}
files: |
build/*