-
Notifications
You must be signed in to change notification settings - Fork 6
97 lines (95 loc) · 2.75 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: 🎉 Release Binary
on:
create:
tags:
- v*
workflow_dispatch:
jobs:
build-mac:
runs-on: macos-latest
steps:
- name: Code checkout
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Checkout submodules
run: |
git submodule update --init --recursive
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.4
- name: Install Dependences
run: |
brew install libpcap
go get github.com/hktalent/ksubdomain/cmd/ksubdomain
go mod vendor
# git submodule update --init --recursive --remote
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release -f .github/build/mac.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/marketplace/actions/run-on-architecture#supported-platforms
build-linux:
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Checkout submodules
run: |
git submodule update --init --recursive
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.4
- name: Install Dependences
run: |
sudo apt install -yy libpcap-dev
go get github.com/hktalent/ksubdomain/cmd/ksubdomain
go mod vendor
env:
GOENABLE: 1
# CGO_LDFLAGS: "-Wl,-static -L/usr/lib/x86_64-linux-gnu/libpcap.a -lpcap -Wl,-Bdynamic"
# git submodule update --init --recursive --remote
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release -f .github/build/linux.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-windows:
runs-on: windows-latest
steps:
- name: Code checkout
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Checkout submodules
run: |
git submodule update --init --recursive
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.4
- name: Install Dependences
run: |
go get github.com/hktalent/ksubdomain/cmd/ksubdomain
go mod vendor
env:
GOENABLE: 1
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release -f .github/build/windows.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}