feat: build Arch packages for x86_64 and aarch64
Some checks failed
Build and Publish APK Package / build-apk (push) Failing after 42s
Build and Publish Arch Package / build-arch (amd64, x86_64) (push) Failing after 1s
Build and Publish Arch Package / build-arch (arm64, aarch64) (push) Failing after 1s
Build and Push Docker Container / build-and-push (push) Successful in 1m49s

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:07:11 +02:00
parent 76158b46f8
commit fa265a1ad1

View File

@@ -11,6 +11,13 @@ jobs:
container: container:
image: archlinux:latest image: archlinux:latest
options: --platform linux/amd64 options: --platform linux/amd64
strategy:
matrix:
include:
- goarch: amd64
pkgarch: x86_64
- goarch: arm64
pkgarch: aarch64
steps: steps:
- name: Install build dependencies - name: Install build dependencies
run: pacman -Syu --noconfirm git nodejs go base-devel curl run: pacman -Syu --noconfirm git nodejs go base-devel curl
@@ -33,6 +40,7 @@ jobs:
pkgname="axolotl" pkgname="axolotl"
sed -i "s/pkgver=.*/pkgver=$pkgver/" packaging/arch/PKGBUILD sed -i "s/pkgver=.*/pkgver=$pkgver/" packaging/arch/PKGBUILD
sed -i "s/^arch=.*/arch=('${{ matrix.pkgarch }}')/" packaging/arch/PKGBUILD
git archive --format=tar.gz --prefix="$pkgname-$pkgver/" -o "packaging/arch/$pkgname-$pkgver.tar.gz" HEAD git archive --format=tar.gz --prefix="$pkgname-$pkgver/" -o "packaging/arch/$pkgname-$pkgver.tar.gz" HEAD
@@ -42,7 +50,7 @@ jobs:
chown -R build:build . chown -R build:build .
- name: Build package - name: Build package
run: su build -c "cd $PWD/packaging/arch && makepkg -s --noconfirm" run: su build -c "cd $PWD/packaging/arch && GOARCH=${{ matrix.goarch }} CARCH=${{ matrix.pkgarch }} makepkg -s --noconfirm"
- name: Publish to Gitea Registry - name: Publish to Gitea Registry
run: | run: |