From f3cba121bdde4c8c2e920430ee4c01a76ee9aeef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Fri, 6 Dec 2024 13:34:32 +0100 Subject: [PATCH] Use QEMU to build on ARM. Closes #6 --- .github/workflows/publish.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dab870a..3040da0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,22 +9,23 @@ permissions: contents: read jobs: - snapcraft: + build: runs-on: ubuntu-latest strategy: matrix: - arch: [amd64, arm64] + platform: + - amd64 + - arm64 steps: - - uses: actions/checkout@v4 - - - uses: snapcore/action-build@v1 - id: build - with: - snapcraft-args: --build-for=${{ matrix.arch }} - - - uses: snapcore/action-publish@v1 - env: - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }} - with: - snap: ${{ steps.build.outputs.snap }} - release: stable + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: diddlesnaps/snapcraft-multiarch-action@v1 + id: snapcraft + with: + architecture: ${{ matrix.platform }} + - uses: snapcore/action-publish@v1 + env: + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }} + with: + snap: ${{ steps.snapcraft.outputs.snap }} + release: stable