-
Notifications
You must be signed in to change notification settings - Fork 4
100 lines (86 loc) · 3.36 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
98
99
100
name: Build
on: [push]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest]
name: '${{ matrix.platform }}'
runs-on: ${{ matrix.platform }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit
- name: Check out repository code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Install go 1.22
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
- name: Build
run: |
make build/vidx2pidx
make OS=windows ARCH=amd64 build/vidx2pidx.exe
make clean
make OS=darwin ARCH=amd64 build/vidx2pidx
make clean
make OS=windows ARCH=arm64 build/vidx2pidx.exe
make clean
make OS=darwin ARCH=arm64 build/vidx2pidx
make clean
make OS=linux ARCH=arm64 build/vidx2pidx
- name: Build executables
run: |
GOOS=windows GOARCH=amd64 go build -o build/win-amd64/vidx2pidx.exe ./cmd
GOOS=windows GOARCH=arm64 go build -o build/win-arm64/vidx2pidx.exe ./cmd
GOOS=darwin GOARCH=amd64 go build -o build/mac-amd64/vidx2pidx ./cmd
GOOS=darwin GOARCH=arm64 go build -o build/mac-arm64/vidx2pidx ./cmd
GOOS=linux GOARCH=amd64 go build -o build/lin-amd64/vidx2pidx ./cmd
GOOS=linux GOARCH=arm64 go build -o build/lin-arm64/vidx2pidx ./cmd
- name: Archive windows amd64 binaries
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: vidx2pidx-windows-amd64
path: ./build/win-amd64/vidx2pidx.exe
retention-days: 1
if-no-files-found: error
- name: Archive windows arm64 binaries
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: vidx2pidx-windows-arm64
path: ./build/win-arm64/vidx2pidx.exe
retention-days: 1
if-no-files-found: error
- name: Archive macos amd64 binaries
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: vidx2pidx-mac-amd64
path: ./build/mac-amd64/vidx2pidx
retention-days: 1
if-no-files-found: error
- name: Archive macos arm64 binaries
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: vidx2pidx-mac-arm64
path: ./build/mac-arm64/vidx2pidx
retention-days: 1
if-no-files-found: error
- name: Archive linux amd64 binaries
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: vidx2pidx-lin-amd64
path: ./build/lin-amd64/vidx2pidx
retention-days: 1
if-no-files-found: error
- name: Archive linux arm64 binaries
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: vidx2pidx-lin-arm64
path: ./build/lin-arm64/vidx2pidx
retention-days: 1
if-no-files-found: error