This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3072 from dholbach/build-snap-using-gh-action
build fluxctl snap using GH action
- Loading branch information
Showing
3 changed files
with
33 additions
and
2 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
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,31 @@ | ||
name: Build snap | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-snap: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Snapcraft | ||
uses: samuelmeuli/action-snapcraft@v1 | ||
with: | ||
snapcraft_token: ${{ secrets.snapcraft_token }} | ||
use_lxd: true | ||
|
||
- name: Run Snapcraft build | ||
run: sudo snapcraft --use-lxd | ||
|
||
- name: Upload to Snapcraft store (edge channel for revs in master) | ||
if: ${{ ! startsWith(github.event.ref, 'refs/tags') }} | ||
run: snapcraft push --release edge fluxctl_*.snap | ||
|
||
- name: Upload to Snapcraft store (stable channel for tagged releases) | ||
if: ${{ startsWith(github.event.ref, 'refs/tags') }} | ||
run: snapcraft push --release stable fluxctl_*.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