Skip to content

Commit

Permalink
[gh_worklow] Build and push snap on release
Browse files Browse the repository at this point in the history
Adding workdlow to publish the released sos to the latest/candidate channel
when the a new release is created via the tag. This ensures less mannual
intervention for future releases.

Update the snap creation for anyone building manually, and need python3-venv
as a build dependancy.

Signed-off-by: Arif Ali <[email protected]>
  • Loading branch information
arif-ali committed Jul 15, 2023
1 parent 59c2660 commit 24f1917
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/snap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ on:
push:
branches:
- main
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
concurrency:
group: snap-build
cancel-in-progress: true
Expand All @@ -25,8 +28,16 @@ jobs:
- run: |
sudo sos help
- uses: snapcore/action-publish@v1
if: ${{ github.event_name == 'push' }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{ steps.build-snap.outputs.snap }}
release: "latest/edge"
- uses: snapcore/action-publish@v1
if: ${{ github.event_name == 'release' }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{ steps.build-snap.outputs.snap }}
release: "latest/candidate"
1 change: 1 addition & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ parts:
- python3
- snapcraft
- gettext
- python3-venv
stage-packages:
- python3.10-minimal
- libpython3.10-minimal
Expand Down

0 comments on commit 24f1917

Please sign in to comment.