-
Notifications
You must be signed in to change notification settings - Fork 101
77 lines (70 loc) · 1.83 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: build
on:
push:
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-targets:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- linux/386
- linux/amd64
- linux/arm
- linux/arm64
- linux/loong64
- linux/ppc64le
- linux/riscv64
- linux/s390x
- linux/mips:cgo
- linux/mips64:cgo
- linux/mips64le:cgo
- linux/mipsle:cgo
- darwin/amd64
- darwin/arm64
- windows/386
- windows/amd64
- windows/arm64
- freebsd/386
- freebsd/amd64
- freebsd/arm
- freebsd/arm64
- openbsd/amd64
- openbsd/arm64
- netbsd/amd64
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Build targets
uses: zijiren233/go-build-action@v1
env:
SUBMICRO_ARM_DISABLED: true
MICRO_ARM64_DISABLED: true
with:
targets: ${{ matrix.target }}
enable-micro: true
config-args: --skip-init-web
- name: Get artifact name
id: get_artifact_name
run: |
echo "ARTIFACT_NAME=$(echo ${{ matrix.target }} | tr ':' '-' | tr '/' '-')" >> $GITHUB_OUTPUT
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.get_artifact_name.outputs.ARTIFACT_NAME }}
path: build/*