-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 940 Bytes
/
push.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
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
go: ["1.22.6"]
goos: [linux]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Build with Go
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
go build -o tunmanager_${{ matrix.goos }}_${{ matrix.goarch }} -ldflags="-w -s" -trimpath -v .
go build -o tunmanager_${{ matrix.goos }}_${{ matrix.goarch }}_debug -trimpath -v .
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: tunmanager_${{ matrix.goos }}_${{ matrix.goarch }}
path: tunmanager_*