Skip to content

Commit

Permalink
fix: rpm/deb/snap packaging on aarch64 linux
Browse files Browse the repository at this point in the history
  • Loading branch information
hexchain committed Jan 29, 2025
1 parent 216352d commit 9fe4738
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,40 @@ jobs:
run: |
echo "INSO_VERSION=$(jq .version ./packages/${{ env.INSO_PACKAGE_NAME }}/package.json -rj)" >> $GITHUB_ENV
- name: Package app (Linux ARM64 only)
- name: Install dependencies (Linux only)
if: runner.os == 'Linux'
run: |
# install snapcraft
sudo snap install snapcraft --classic
# install fpm for electron-builder
sudo gem install fpm
fpm --version
- name: Apply runner system workarounds (ARM64 Linux only)
if: runner.os == 'Linux' && runner.arch == 'ARM64'
shell: bash
run: npm run app-package
env:
NODE_OPTIONS: '--max_old_space_size=6144'
BUILD_TARGETS: tar.gz
run: |
# install LXD for snap building
sudo snap install lxd
- name: Package app (Linux X64 only)
if: runner.os == 'Linux' && runner.arch == 'X64'
# initialize lxd default profile
sudo lxd init --auto
# add runner user to lxd group
sudo gpasswd -a $USER lxd
# workaround network issues when docker is started before lxc
sudo iptables -I DOCKER-USER -i lxdbr0 -j ACCEPT
sudo iptables -I DOCKER-USER -o lxdbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
- name: Package app (Linux only)
if: runner.os == 'Linux'
shell: bash
run: npm run app-package
# run with sudo to let the lxd group membership take effect
run: sudo --user $USER --preserve-env -- bash -c 'npm run app-package'
env:
# https://github.com/electron-userland/electron-builder/issues/6116
USE_SYSTEM_FPM: 'true'
NODE_OPTIONS: '--max_old_space_size=6144'

# If this step fails its possible apple has new license terms which need to be accepted by logging into https://developer.apple.com/account
Expand Down

0 comments on commit 9fe4738

Please sign in to comment.