-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add snap related CI workflows
Signed-off-by: guillaume <[email protected]>
- Loading branch information
Showing
3 changed files
with
69 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Build Snap | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build-snap: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build snap | ||
uses: snapcore/action-build@v1 | ||
id: build | ||
|
||
- name: Upload locally built snap artifact | ||
if: ${{ github.ref_name == 'main' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: snap | ||
path: ${{ steps.build.outputs.snap }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Publish Snap | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
publish-snap: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Downloads locally built snap artifact | ||
uses: actions/download-artifact@v4 | ||
id: download | ||
with: | ||
name: snap | ||
|
||
- name: Determine snap file name | ||
id: find-snap | ||
run: | | ||
SNAP_FILE=$(ls *.snap) | ||
echo "Found snap file: $SNAP_FILE" | ||
echo "snap_file=${SNAP_FILE}" >>$GITHUB_OUTPUT | ||
- name: Publish snap | ||
uses: snapcore/[email protected] | ||
env: | ||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} | ||
if: ${{ github.ref_name == 'main' }} | ||
with: | ||
snap: ${{ steps.find-snap.outputs.snap_file }} | ||
release: edge |