aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/snap.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/snap.yaml')
-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"