-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.16 KB
/
release-verify.yml
File metadata and controls
52 lines (44 loc) · 1.16 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
name: Release Matrix Verify
on:
pull_request:
workflow_dispatch:
jobs:
verify-build-matrix:
name: Verify ${{ matrix.goos }}-${{ matrix.goarch }} build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: windows
goarch: amd64
- goos: windows
goarch: arm64
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Verify tests on host
run: go test ./...
- name: Cross-compile target
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
set -euo pipefail
OUT="/tmp/sops-cop"
if [[ "$GOOS" == "windows" ]]; then
OUT="${OUT}.exe"
fi
CGO_ENABLED=0 GOOS="$GOOS" GOARCH="$GOARCH" go build -trimpath -ldflags="-s -w" -o "$OUT" .