actions: use official snap action

This commit is contained in:
Dag Heyman 2020-06-10 07:23:20 +02:00
parent 88adf77dd1
commit 17c9c4bcc9
2 changed files with 12 additions and 23 deletions

View File

@ -4,31 +4,17 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Build snap
run: |
sudo snap install snapcraft --classic
sudo chown root:root /
sudo apt-get remove -qy lxd lxd-client
sudo snap install lxd
sudo lxd init --auto
export REF=$(echo ${GITHUB_REF} | cut -d '/' -f 3)
sudo snapcraft --use-lxd
mkdir deploy
mv yubioath-desktop*.snap yubioath-desktop-${REF}.snap
cp yubioath-desktop*.snap deploy
- uses: snapcore/action-build@v1
id: snapcraft
- name: Install snap
run: |
sudo snap install yubioath-desktop*.snap --devmode
- name: Install snap
run: sudo snap install --dangerous ${{ steps.snapcraft.outputs.snap }}
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: yubioath-desktop-snap
path: deploy
- uses: actions/upload-artifact@v2
with:
name: snap
path: ${{ steps.snapcraft.outputs.snap }}

View File

@ -62,6 +62,8 @@ parts:
python:
plugin: nil
build-packages:
- curl
- rsync
- git
- zlib1g-dev
- libbz2-dev
@ -95,6 +97,7 @@ parts:
after: [python]
build-packages:
- swig
- rsync
build-environment:
- PATH: /root/.pyenv/bin:$PATH
override-build: |