aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorArif Ali <arif.ali@canonical.com>2023-06-27 17:49:03 +0100
committerJake Hunsaker <jacob.r.hunsaker@gmail.com>2023-07-17 09:20:57 -0400
commitaf6de1e1ae4da5f8cc768b2d7b52dc8c55303774 (patch)
tree3803fd2e29e14759185998a87bd2c93c965c8c0f /.github
parent59c2660584734af92eca2eae31af3fbf5557f853 (diff)
downloadsos-af6de1e1ae4da5f8cc768b2d7b52dc8c55303774.tar.gz
[gh_worklow] Build and push snap on release
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 <arif.ali@canonical.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/snap.yaml13
1 files changed, 12 insertions, 1 deletions
diff --git a/.github/workflows/snap.yaml b/.github/workflows/snap.yaml
index e6890835..d7d89352 100644
--- a/.github/workflows/snap.yaml
+++ b/.github/workflows/snap.yaml
@@ -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
@@ -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"