@@ -11,114 +11,114 @@ jobs:
1111 name : Build for MacOS
1212 runs-on : macos-13
1313 steps :
14- - name : " Checkout"
14+ - name : Checkout
1515 uses : actions/checkout@v4
16- - name : " Setup Go"
16+ - name : Setup Go
1717 uses : actions/setup-go@v4
1818 with :
1919 go-version : ' ^1.18'
20- - name : " Build"
21- run : make build_macos
22- - name : Upload
23- uses : actions/upload-artifact@v4
20+ - name : Build arm64 gui
21+ uses : ./.github/actions/build.yml
2422 with :
25- name : macos
26- path : _output/macos/yarr.app
23+ id : darwin_arm64_gui
24+ cmd : make darwin_arm64_gui
25+ out : out/darwin_arm64_gui/yarr.app
26+ - name : Build amd64 gui
27+ uses : ./.github/actions/build.yml
28+ with :
29+ id : darwin_amd64_gui
30+ cmd : make darwin_amd64_gui
31+ out : out/darwin_amd64_gui/yarr.app
32+ - name : Build arm64
33+ uses : ./.github/actions/build.yml
34+ with :
35+ id : darwin_arm64
36+ cmd : make darwin_arm64
37+ out : out/darwin_arm64/yarr
38+ - name : Build amd64
39+ uses : ./.github/actions/build.yml
40+ with :
41+ id : darwin_amd64
42+ cmd : make darwin_amd64
43+ out : out/darwin_amd64/yarr
2744
2845 build_windows :
2946 name : Build for Windows
3047 runs-on : windows-2022
3148 steps :
32- - name : " Checkout"
49+ - name : Checkout
3350 uses : actions/checkout@v4
34- - name : " Setup Go"
51+ - name : Setup Go
3552 uses : actions/setup-go@v4
3653 with :
3754 go-version : ' ^1.18'
38- - name : " Build"
39- run : make build_windows
40- - name : Upload
41- uses : actions/upload-artifact@v4
55+ - name : Setup Zig
56+ uses : mlugg/setup-zig@v1
57+ with :
58+ version : 0.14.0
59+ - name : Build arm64 gui
60+ uses : ./.github/actions/build.yml
61+ with :
62+ id : windows_arm64_gui
63+ cmd : make windows_arm64_gui
64+ out : out/windows_arm64_gui/yarr.app
65+ - name : Build amd64 gui
66+ uses : ./.github/actions/build.yml
67+ with :
68+ id : windows_amd64_gui
69+ cmd : make windows_amd64_gui
70+ out : out/windows_amd64_gui/yarr.app
71+ - name : Build arm64
72+ uses : ./.github/actions/build.yml
4273 with :
43- name : windows
44- path : _output/windows/yarr.exe
74+ id : windows_arm64
75+ cmd : make windows_arm64
76+ out : out/windows_arm64/yarr
77+ - name : Build amd64
78+ uses : ./.github/actions/build.yml
79+ with :
80+ id : windows_amd64
81+ cmd : make windows_amd64
82+ out : out/windows_amd64/yarr
4583
4684 build_linux :
4785 name : Build for Linux
4886 runs-on : ubuntu-22.04
4987 steps :
50- - name : " Checkout"
88+ - name : Checkout
5189 uses : actions/checkout@v4
52- - name : " Setup Go"
90+ - name : Setup Go
5391 uses : actions/setup-go@v4
5492 with :
5593 go-version : ' ^1.18'
56- - name : " Build"
57- run : make build_linux
58- - name : Upload
59- uses : actions/upload-artifact@v4
94+ - name : Setup Zig
95+ uses : mlugg/setup-zig@v1
6096 with :
61- name : linux
62- path : _output/linux/yarr
63-
64- build_linux-arm :
65- name : Build for Linux ARM
66- runs-on : ubuntu-22.04
67- steps :
68- - name : Install dependencies
69- run : >
70- sudo apt-get install -y
71- gcc-arm-linux-gnueabihf
72- libc6-dev-armhf-cross
73- - name : " Checkout"
74- uses : actions/checkout@v4
75- - name : " Setup Go"
76- uses : actions/setup-go@v4
97+ version : 0.14.0
98+ - name : Build amd64
99+ uses : ./.github/actions/build.yml
77100 with :
78- go-version : ' ^1.18'
79- - name : " Build"
80- env :
81- CC : arm-linux-gnueabihf-gcc
82- GOARCH : arm
83- GOARM : 7
84- run : make build_linux
85- - name : Upload
86- uses : actions/upload-artifact@v4
87- with :
88- name : linux_arm
89- path : _output/linux/yarr
90-
91- build_linux-arm64 :
92- name : Build for Linux ARM64
93- runs-on : ubuntu-22.04
94- steps :
95- - name : Install dependencies
96- run : >
97- sudo apt-get install -y
98- gcc-aarch64-linux-gnu
99- libc6-dev-arm64-cross
100- - name : " Checkout"
101- uses : actions/checkout@v4
102- - name : " Setup Go"
103- uses : actions/setup-go@v4
101+ id : windows_amd64
102+ cmd : make windows_amd64
103+ out : out/windows_amd64/yarr
104+ - name : Build arm64
105+ uses : ./.github/actions/build.yml
104106 with :
105- go-version : ' ^1.18'
106- - name : " Build"
107- env :
108- CC : aarch64-linux-gnu-gcc
109- GOARCH : arm64
110- run : make build_linux
111- - name : Upload
112- uses : actions/upload-artifact@v4
113- with :
114- name : linux_arm64
115- path : _output/linux/yarr
107+ id : windows_arm64
108+ cmd : make windows_arm64
109+ out : out/windows_arm64/yarr
110+ - name : Build armv7
111+ uses : ./.github/actions/build.yml
112+ with :
113+ id : windows_armv7
114+ cmd : make windows_armv7
115+ out : out/windows_armv7/yarr
116116
117117 create_release :
118118 name : Create Release
119119 runs-on : ubuntu-latest
120- if : ${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'test') }}
121- needs : [build_macos, build_windows, build_linux, build_linux-arm, build_linux-arm64 ]
120+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
121+ needs : [build_macos, build_windows, build_linux]
122122 steps :
123123 - name : Download Artifacts
124124@@ -127,26 +127,12 @@ jobs:
127127 - name : Preparation
128128 run : |
129129 ls -R
130- chmod u+x macos/Contents/MacOS/yarr
131- chmod u+x linux/yarr
132- chmod u+x linux_arm/yarr
133- chmod u+x linux_arm64/yarr
134-
135- mv macos yarr.app && zip -r yarr-${GITHUB_REF_NAME}-macos64.zip yarr.app
136- ( cd windows && zip ../yarr-${GITHUB_REF_NAME}-windows64.zip yarr.exe )
137- ( cd linux && zip ../yarr-${GITHUB_REF_NAME}-linux64.zip yarr )
138- ( cd linux_arm && zip ../yarr-${GITHUB_REF_NAME}-linux_arm.zip yarr )
139- ( cd linux_arm64 && zip ../yarr-${GITHUB_REF_NAME}-linux_arm64.zip yarr )
140130 - name : Upload Release
131+ if : false
141132 uses : softprops/action-gh-release@v2
142133 env :
143134 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
144135 with :
145136 draft : true
146137 prerelease : true
147- files : |
148- yarr-${{ github.ref_name }}-macos64.zip
149- yarr-${{ github.ref_name }}-windows64.zip
150- yarr-${{ github.ref_name }}-linux64.zip
151- yarr-${{ github.ref_name }}-linux_arm.zip
152- yarr-${{ github.ref_name }}-linux_arm64.zip
138+ files : *.zip
0 commit comments