fix: build differently so arm64 can be generated (#946)

This commit is contained in:
Baptiste Augrain 2021-12-18 01:24:22 +01:00 committed by GitHub
parent 36b06dd66b
commit 02755e7599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 4 deletions

View File

@ -109,10 +109,14 @@ jobs:
- name: Check deploy - name: Check deploy
run: ./stores/snapcraft/check_deploy.sh run: ./stores/snapcraft/check_deploy.sh
- name: Build snap - name: Install Snapcraft with LXD
uses: snapcore/action-build@v1 uses: samuelmeuli/action-snapcraft@v1
with: with:
path: stores/snapcraft use_lxd: true
if: env.SHOULD_DEPLOY == 'yes'
- name: Build snap
run: ./stores/snapcraft/build.sh
if: env.SHOULD_DEPLOY == 'yes' if: env.SHOULD_DEPLOY == 'yes'
- name: Publish snap - name: Publish snap

13
stores/snapcraft/build.sh Executable file
View File

@ -0,0 +1,13 @@
#!/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

@ -21,6 +21,8 @@ else
GH_VERSION=$(jq -r 'sort_by(.tag_name)|last.tag_name' gh_latest.json) GH_VERSION=$(jq -r 'sort_by(.tag_name)|last.tag_name' gh_latest.json)
echo "GH version: ${GH_VERSION}" echo "GH version: ${GH_VERSION}"
rm -f snap_latest.json gh_latest.json
if [[ "${SNAP_VERSION}" == "${GH_VERSION}" ]]; then if [[ "${SNAP_VERSION}" == "${GH_VERSION}" ]]; then
export SHOULD_DEPLOY="no" export SHOULD_DEPLOY="no"
else else

View File

@ -2,8 +2,14 @@
set -e set -e
CALLER_DIR=$( pwd )
cd "$( dirname "${BASH_SOURCE[0]}" )"
echo "$SNAP_STORE_LOGIN" | snapcraft login --with - echo "$SNAP_STORE_LOGIN" | snapcraft login --with -
snapcraft upload --release=stable *.snap snapcraft upload --release=stable *.snap
snapcraft logout snapcraft logout
cd "${CALLER_DIR}"

View File

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