File tree Expand file tree Collapse file tree 2 files changed +33
-9
lines changed Expand file tree Collapse file tree 2 files changed +33
-9
lines changed Original file line number Diff line number Diff line change 41
41
github-token : ${{ secrets.GITHUB_TOKEN }}
42
42
file : coverage.out
43
43
44
- - name : Build Multi-arch-linux
45
- run : make build-multi-arch-linux
44
+ build-linux-binaries :
45
+ name : Build Multi-arch-linux
46
+ runs-on : ubuntu-latest
47
+ strategy :
48
+ matrix :
49
+ platform : [ linux ]
50
+ architecture :
51
+ - amd64
52
+ - arm64
53
+ - ppc64le
54
+ - s390x
55
+ steps :
56
+ - uses : actions/checkout@v4
57
+ - name : Build linux binary for ${{ matrix.architecture }}
58
+ run : make build-linux-${{ matrix.architecture }}
46
59
47
- - name : Build Multi-arch-mac
48
- run : make build-multi-arch-mac
60
+ build-mac-binaries :
61
+ name : Build Multi-arch-mac
62
+ runs-on : ubuntu-latest
63
+ strategy :
64
+ matrix :
65
+ architecture : [ amd64, arm64 ]
66
+ steps :
67
+ - uses : actions/checkout@v4
68
+ - name : Build Mac binary for ${{ matrix.architecture }}
69
+ run : make build-mac-${{ matrix.architecture }}
Original file line number Diff line number Diff line change @@ -57,10 +57,13 @@ jobs:
57
57
tag : ${{ inputs.tag }}
58
58
GH_TOKEN : ${{ secrets.token }}
59
59
60
- # an ugly workaround to build binaries for mac. builds locally and pushes to the release.
60
+ # builds mac binaries in parallel using matrix strategy
61
61
add-darwin-bins :
62
62
name : Release binaries for MacOS
63
63
runs-on : ubuntu-latest
64
+ strategy :
65
+ matrix :
66
+ architecture : [amd64, arm64]
64
67
steps :
65
68
- uses : actions/checkout@v4
66
69
- name : Set Env Tags
@@ -72,12 +75,12 @@ jobs:
72
75
uses : actions/setup-go@v5
73
76
with :
74
77
go-version-file : go.mod
75
- - name : Build Multi-arch-mac
76
- run : make build-multi-arch- mac
78
+ - name : Build Mac binary for ${{ matrix.architecture }}
79
+ run : make build-mac-${{ matrix.architecture }}
77
80
78
- - name : Upload binaries to the release
81
+ - name : Upload binary to the release
79
82
run :
80
- gh release upload --repo "${GITHUB_REPOSITORY}" "${tag}" preflight-darwin-*
83
+ gh release upload --repo "${GITHUB_REPOSITORY}" "${tag}" preflight-darwin-${{ matrix.architecture }}
81
84
env :
82
85
tag : ${{ inputs.tag }}
83
86
GH_TOKEN : ${{ secrets.token }}
You can’t perform that action at this time.
0 commit comments