From a6258d8a6e8ce081a1573450c0c7234b026f54ff Mon Sep 17 00:00:00 2001 From: siwatanejo <7511840+siwatanejo@users.noreply.github.com> Date: Wed, 20 Mar 2024 19:27:06 +0100 Subject: [PATCH] CI: add snap package publish job --- .github/workflows/CI.yml | 30 ++++++++++++++++++++++++++++++ snap/snapcraft.yaml | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 59b5577..5c7ddd3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,6 +2,9 @@ name: CI on: [push, pull_request, workflow_dispatch] +env: + SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}} + jobs: build: runs-on: ubuntu-22.04 @@ -126,3 +129,30 @@ jobs: dotnet fantomas . git diff --exit-code + publish_snap: + needs: + - run_snap + - integration_tests + - conventions + + runs-on: ubuntu-22.04 + steps: + - uses: actions/download-artifact@v3 + name: Download artifact + with: + name: snap + + - name: Unzip & upload snap + run: | + zip -r snap.zip . + + - name: Install snapcraft + run: | + sudo snap install --classic snapcraft + snapcraft --version + + - name: Upload to SnapStore + run: | + # no need to 'snapcraft login' first, see https://forum.snapcraft.io/t/snapcraft-authentication-options/30473/21 + snapcraft upload *.snap --release=beta + diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 95aeea5..9301068 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: packwallet # you probably want to 'snapcraft register ' base: core22 # the base snap is the execution environment for this snap -version: '0.1' # just for humans, typically '1.2+git' or '1.3.2' +version: '0.1.1' # just for humans, typically '1.2+git' or '1.3.2' summary: HelloWorld F# app with snap # 79 char long summary description: | Parse CoinDesk API to show current BTC price.