Skip to content

Commit

Permalink
CI: add snap package publish job
Browse files Browse the repository at this point in the history
  • Loading branch information
siwatanejo committed Mar 20, 2024
1 parent e737fea commit a6258d8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/CI.yml
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
@@ -1,6 +1,6 @@
name: packwallet # you probably want to 'snapcraft register <name>'
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.
Expand Down

0 comments on commit a6258d8

Please sign in to comment.