@@ -10,49 +10,41 @@ permissions:
1010
1111jobs :
1212 build :
13- name : Build binaries
13+ name : Build binary (${{ matrix.arch }})
1414 runs-on : ubuntu-latest
1515
1616 strategy :
1717 matrix :
1818 include :
1919 - arch : amd64
20- cc : gcc
20+ platform : linux/amd64
2121 - arch : arm64
22- cc : aarch64- linux-gnu-gcc
22+ platform : linux/arm64
2323
2424 steps :
2525 - name : Checkout
2626 uses : actions/checkout@v4
2727
28- - name : Install dependencies
29- run : |
30- sudo apt-get update
31- sudo apt-get install -y \
32- build-essential \
33- pkg-config \
34- libglib2.0-dev \
35- libssl-dev \
36- libmicrohttpd-dev \
37- libjson-glib-dev \
38- gcc-aarch64-linux-gnu \
39- libglib2.0-dev:arm64 \
40- libssl-dev:arm64 \
41- libmicrohttpd-dev:arm64 \
42- libjson-glib-dev:arm64
28+ - name : Set up QEMU
29+ uses : docker/setup-qemu-action@v3
4330
44- - name : Enable ARM64 apt architecture
45- if : matrix.arch == 'arm64'
46- run : sudo dpkg --add-architecture arm64
31+ - name : Set up Docker Buildx
32+ uses : docker/setup-buildx-action@v3
4733
48- - name : Build
49- run : make clean && make UI=1 VERSION=${GITHUB_REF_NAME} CC=${{ matrix.cc }}
34+ - name : Build binary inside Docker
35+ run : |
36+ docker buildx build \
37+ --platform ${{ matrix.platform }} \
38+ --build-arg VERSION=${GITHUB_REF_NAME} \
39+ --output type=local,dest=./output \
40+ --target export \
41+ .
5042
5143 - name : Upload artifact
5244 uses : actions/upload-artifact@v4
5345 with :
5446 name : deadlight-linux-${{ matrix.arch }}
55- path : bin /deadlight
47+ path : output /deadlight
5648
5749 release :
5850 name : Publish Release
@@ -65,12 +57,11 @@ jobs:
6557 with :
6658 path : artifacts
6759
68- - name : Rename binaries and generate checksums
60+ - name : Rename and generate checksums
6961 run : |
70- cd artifacts
71- mv deadlight-linux-amd64/deadlight deadlight-linux-amd64
72- mv deadlight-linux-arm64/deadlight deadlight-linux-arm64
73- sha256sum deadlight-linux-amd64 deadlight-linux-arm64 > checksums.txt
62+ mv artifacts/deadlight-linux-amd64/deadlight artifacts/deadlight-linux-amd64
63+ mv artifacts/deadlight-linux-arm64/deadlight artifacts/deadlight-linux-arm64
64+ sha256sum artifacts/deadlight-linux-amd64 artifacts/deadlight-linux-arm64 > artifacts/checksums.txt
7465
7566 - name : Create Release
7667 uses : softprops/action-gh-release@v2
0 commit comments