-
Notifications
You must be signed in to change notification settings - Fork 3
92 lines (80 loc) · 2.77 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
name: Build
on: [push]
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest]
name: '${{ matrix.platform }}'
runs-on: ${{ matrix.platform }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install go 1.22
uses: actions/setup-go@v5
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@v4
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@v4
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@v4
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@v4
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@v4
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@v4
with:
name: vidx2pidx-lin-arm64
path: ./build/lin-arm64/vidx2pidx
retention-days: 1
if-no-files-found: error