From 17c9c4bcc94c9816396de2cb0be0099421badf71 Mon Sep 17 00:00:00 2001 From: Dag Heyman Date: Wed, 10 Jun 2020 07:23:20 +0200 Subject: [PATCH] actions: use official snap action --- .github/workflows/snap.yml | 32 +++++++++----------------------- snap/snapcraft.yaml | 3 +++ 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml index 8a80b1ef..a665cd07 100644 --- a/.github/workflows/snap.yml +++ b/.github/workflows/snap.yml @@ -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 }} diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index fa5120f1..34752bf1 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -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: |