mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
ci: add snap publishing workflow (#2435)
Co-authored-by: sxyazi <sxyazi@gmail.com>
This commit is contained in:
parent
3082cad16c
commit
2d210ae557
2 changed files with 33 additions and 0 deletions
26
.github/workflows/draft.yml
vendored
26
.github/workflows/draft.yml
vendored
|
|
@ -232,3 +232,29 @@ jobs:
|
|||
name: Nightly Build
|
||||
body: ${{ env.NIGHTLY_BODY }}
|
||||
target_commitish: ${{ github.sha }}
|
||||
|
||||
snap:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-snap]
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: yazi-*.snap
|
||||
merge-multiple: true
|
||||
|
||||
- name: Setup snapcraft
|
||||
run: sudo snap install --classic snapcraft
|
||||
|
||||
- name: Push snap to candidate channel
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
|
||||
run: |
|
||||
parallel 'snapcraft push -v --release latest/candidate {}' ::: yazi-*.snap
|
||||
|
||||
- name: Push snap to edge channel
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
|
||||
run: |
|
||||
parallel 'snapcraft push -v --release latest/edge {}' ::: yazi-*.snap
|
||||
|
|
|
|||
7
.github/workflows/publish.yml
vendored
7
.github/workflows/publish.yml
vendored
|
|
@ -18,3 +18,10 @@ jobs:
|
|||
identifier: sxyazi.yazi
|
||||
installers-regex: 'yazi-(x86_64|aarch64)-pc-windows-msvc\.zip$'
|
||||
token: ${{ secrets.WINGET_TOKEN }}
|
||||
|
||||
- name: Promote snap to stable
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
|
||||
run: |
|
||||
sudo snap install --classic snapcraft
|
||||
snapcraft promote yazi --from-channel latest/candidate --to-channel latest/stable --yes
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue