Skip to content

Commit 05be328

Browse files
jnsgruksxyazi
andauthored
ci: add snap publishing workflow (#2435)
Co-authored-by: sxyazi <[email protected]>
1 parent 3082cad commit 05be328

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.github/workflows/draft.yml

+12
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ jobs:
196196
yazi-*.snap
197197
generate_release_notes: true
198198

199+
- name: Push snap to candidate channel
200+
env:
201+
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
202+
run: |
203+
parallel 'snapcraft push -v --release latest/candidate {}' ::: *.snap
204+
199205
nightly:
200206
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
201207
permissions:
@@ -232,3 +238,9 @@ jobs:
232238
name: Nightly Build
233239
body: ${{ env.NIGHTLY_BODY }}
234240
target_commitish: ${{ github.sha }}
241+
242+
- name: Push snap to edge channel
243+
env:
244+
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
245+
run: |
246+
parallel 'snapcraft push -v --release latest/edge {}' ::: *.snap

.github/workflows/publish.yml

+5
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ jobs:
1818
identifier: sxyazi.yazi
1919
installers-regex: 'yazi-(x86_64|aarch64)-pc-windows-msvc\.zip$'
2020
token: ${{ secrets.WINGET_TOKEN }}
21+
22+
- name: Promote snap to latest/stable
23+
env:
24+
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
25+
run: snapcraft promote yazi --from-channel latest/candidate --to-channel latest/stable --yes

0 commit comments

Comments
 (0)