mirror of
https://github.com/zealdocs/zeal.git
synced 2026-08-29 16:40:51 +08:00
@@ -0,0 +1,58 @@
|
||||
name: Publish Snap Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
channel:
|
||||
description: "Snap Store channel"
|
||||
required: true
|
||||
default: edge
|
||||
type: choice
|
||||
options:
|
||||
- stable
|
||||
- candidate
|
||||
- beta
|
||||
- edge
|
||||
# TODO: Add schedule trigger for edge channel.
|
||||
# schedule:
|
||||
# - cron: '0 0 * * 1'
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: ${{ matrix.name }}
|
||||
if: github.repository == 'zealdocs/zeal'
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: amd64
|
||||
os: ubuntu-latest
|
||||
- name: arm64
|
||||
os: ubuntu-24.04-arm
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build Snap
|
||||
id: build
|
||||
uses: snapcore/action-build@v1
|
||||
|
||||
- name: Publish to Snap Store
|
||||
uses: snapcore/action-publish@v1
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
|
||||
with:
|
||||
snap: ${{ steps.build.outputs.snap }}
|
||||
release: ${{ inputs.channel || 'stable' }}
|
||||
Reference in New Issue
Block a user