From 46f8c73877eb5a6b67551b8baa7c1f5735bcfdef Mon Sep 17 00:00:00 2001 From: Rob Wilkerson Date: Wed, 1 Jul 2026 21:20:41 -0400 Subject: [PATCH] ci: fix Linux arm64 release by using a native fpm electron-builder bundles only an x86 fpm binary, so the deb/pacman targets fail with 'Exec format error' on the native ubuntu-24.04-arm runner. Install a native fpm on the arm64 leg and export USE_SYSTEM_FPM to $GITHUB_ENV there so electron-builder uses it. Scope the flag to arm64: defining USE_SYSTEM_FPM at all (even empty) makes electron-builder use a system fpm, which the x64 runner does not have. --- .github/workflows/release.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7bed2b7f..569f888f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,7 +94,21 @@ jobs: # `bsdtar` (libarchive-tools) is required by electron-builder's pacman # target to generate the package .MTREE; it isn't on the GitHub Ubuntu # runners (x64 or arm64). - run: sudo apt-get update && sudo apt-get install -y libarchive-tools + # + # electron-builder only bundles an x86 `fpm`, so the deb/pacman targets + # fail with "Exec format error" on the native arm64 runner. Install a + # native fpm there and switch electron-builder to it via USE_SYSTEM_FPM. + # Scope the flag to arm64 by exporting it to $GITHUB_ENV only here: + # defining USE_SYSTEM_FPM at all (even empty) makes electron-builder use + # a system fpm, which the x64 runner doesn't have. + run: | + sudo apt-get update + sudo apt-get install -y libarchive-tools + if [ "${{ matrix.name }}" = "Linux arm64" ]; then + sudo apt-get install -y ruby ruby-dev build-essential + sudo gem install fpm --no-document + echo "USE_SYSTEM_FPM=true" >> "$GITHUB_ENV" + fi - name: Build release artifacts run: ${{ matrix.command }}