fix: use diddlesnaps/snapcraft-multiarch-action to generate arm64 snap (#949)

This commit is contained in:
Baptiste Augrain 2021-12-18 02:25:18 +01:00 committed by GitHub
parent 3103c80234
commit 99840540ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 41 deletions

View File

@ -101,7 +101,12 @@ jobs:
snap:
needs: release
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- amd64
- arm64
steps:
- uses: actions/checkout@v2
@ -109,18 +114,19 @@ jobs:
- name: Check version
run: ./stores/snapcraft/check_version.sh
- name: Install Snapcraft with LXD
uses: samuelmeuli/action-snapcraft@v1
- uses: docker/setup-qemu-action@v1
if: env.SHOULD_DEPLOY == 'yes'
- uses: diddlesnaps/snapcraft-multiarch-action@v1
with:
use_lxd: true
path: stores/snapcraft
architecture: ${{ matrix.platform }}
id: build
if: env.SHOULD_DEPLOY == 'yes'
- name: Build snap
run: ./stores/snapcraft/build.sh
if: env.SHOULD_DEPLOY == 'yes'
- name: Release snap
run: ./stores/snapcraft/release.sh
env:
SNAP_STORE_LOGIN: ${{ secrets.SNAP_STORE_LOGIN }}
- uses: snapcore/action-publish@v1
with:
store_login: ${{ secrets.SNAP_STORE_LOGIN }}
snap: ${{ steps.build.outputs.snap }}
release: stable
if: env.SHOULD_DEPLOY == 'yes'

View File

@ -1,13 +0,0 @@
#!/bin/bash
set -e
CALLER_DIR=$( pwd )
cd "$( dirname "${BASH_SOURCE[0]}" )"
sg lxd -c 'snapcraft --use-lxd'
ls -la
cd "${CALLER_DIR}"

View File

@ -1,15 +0,0 @@
#!/bin/bash
set -e
CALLER_DIR=$( pwd )
cd "$( dirname "${BASH_SOURCE[0]}" )"
echo "$SNAP_STORE_LOGIN" | snapcraft login --with -
snapcraft upload --release=stable *.snap
snapcraft logout
cd "${CALLER_DIR}"

View File

@ -73,7 +73,7 @@ parts:
after:
- codium
plugin: dump
source: local
source: snap/local
apps:
codium: