mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
ci: add snap publishing workflow
This commit adds snap publishing and promotion to the CI process.
For nightly releases, upload the built snaps to the 'latest/edge'
channel, enabling users to track nightly builds with:
snap install yazi --classic --channel latest/edge
For draft releases, upload the built snaps to the 'latest/candidate'
channel.
And finally, when a release is published, promote the snaps that
are in the 'latest/candidate' channel to 'latest/stable'.
This commit is contained in:
parent
3082cad16c
commit
0b366b7dc0
2 changed files with 21 additions and 0 deletions
16
.github/workflows/draft.yml
vendored
16
.github/workflows/draft.yml
vendored
|
|
@ -187,6 +187,14 @@ jobs:
|
|||
with:
|
||||
merge-multiple: true
|
||||
|
||||
- name: Push snap to latest/candidate channel
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
|
||||
run: |
|
||||
for x in *.snap; do
|
||||
snapcraft push -v --release latest/candidate $x
|
||||
done
|
||||
|
||||
- name: Draft
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
|
|
@ -221,6 +229,14 @@ jobs:
|
|||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git tag --force nightly && git push --force origin tag nightly
|
||||
|
||||
- name: Push snap to latest/edge channel
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
|
||||
run: |
|
||||
for x in *.snap; do
|
||||
snapcraft push -v --release latest/edge $x
|
||||
done
|
||||
|
||||
- name: Nightly
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
|
|
|
|||
5
.github/workflows/publish.yml
vendored
5
.github/workflows/publish.yml
vendored
|
|
@ -18,3 +18,8 @@ jobs:
|
|||
identifier: sxyazi.yazi
|
||||
installers-regex: 'yazi-(x86_64|aarch64)-pc-windows-msvc\.zip$'
|
||||
token: ${{ secrets.WINGET_TOKEN }}
|
||||
|
||||
- name: Promote snap to latest/stable
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
|
||||
run: snapcraft promote yazi --from-channel latest/candidate --to-channel latest/stable --yes
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue