-
Notifications
You must be signed in to change notification settings - Fork 12
45 lines (38 loc) · 1.27 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This file is centrally managed as a template file in https://github.com/canonical/solutions-engineering-automation
# To update the file:
# - Edit it in the canonical/solutions-engineering-automation repository.
# - Open a PR with the changes.
# - When the PR merges, the soleng-terraform bot will open a PR to the target repositories with the changes.
name: Publish snap
on:
push:
branches: [ main ]
release:
types: [ published ]
jobs:
check:
uses: ./.github/workflows/check.yaml
secrets: inherit
release:
runs-on: ${{ matrix.runs-on }}
needs: check
strategy:
fail-fast: false
matrix:
runs-on: [[ubuntu-22.04]]
steps:
- uses: actions/checkout@v4
- name: Determine system architecture
run: echo "SYSTEM_ARCH=$(uname -m)" >> $GITHUB_ENV
- name: Download the built snap from check workflow
uses: actions/download-artifact@v4
with:
name: snap_${{ env.SYSTEM_ARCH }}
- name: Find the downloaded snap file
run: echo "SNAP_FILE=$(find . -name "*.snap")" >> $GITHUB_ENV
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{ env.SNAP_FILE }}
release: latest/edge