feat: build APK packages for x86_64 and aarch64

Uses a matrix strategy with Go cross-compilation (GOARCH + CARCH)
so both architectures build in the same amd64 container.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-02 04:13:53 +02:00
parent fa265a1ad1
commit a1104f199f

View File

@@ -10,6 +10,14 @@ jobs:
- ubuntu-24.04
container:
image: alpine:latest
options: --platform linux/amd64
strategy:
matrix:
include:
- goarch: amd64
pkgarch: x86_64
- goarch: arm64
pkgarch: aarch64
steps:
- name: Install build dependencies
run: |
@@ -39,6 +47,7 @@ jobs:
pkgname="axolotl"
sed -i "s/pkgver=.*/pkgver=$pkgver/" packaging/alpine/APKBUILD
sed -i "s/^arch=.*/arch=\"${{ matrix.pkgarch }}\"/" packaging/alpine/APKBUILD
git archive --format=tar.gz --prefix="$pkgname-$pkgver/" -o "packaging/alpine/$pkgname-$pkgver.tar.gz" HEAD
@@ -49,7 +58,7 @@ jobs:
run: su build -c "cd $PWD/packaging/alpine && abuild checksum"
- name: Build package
run: su build -c "cd $PWD/packaging/alpine && abuild -r"
run: su build -c "cd $PWD/packaging/alpine && GOARCH=${{ matrix.goarch }} CARCH=${{ matrix.pkgarch }} abuild -r"
- name: Publish to Gitea Registry
run: |