build(snap): add snap packaging (#1800)

Fixes #1062.
This commit is contained in:
Oleg Shparber
2026-04-04 14:31:07 +03:00
committed by GitHub
parent 0199d4aeb9
commit 5c166158a4
4 changed files with 120 additions and 0 deletions
+58
View File
@@ -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' }}
+3
View File
@@ -33,6 +33,9 @@ CMakeUserPresets.json
# Chocolatey # Chocolatey
*.nupkg *.nupkg
# Snap
*.snap
# Linux appdata # Linux appdata
/assets/freedesktop/org.zealdocs.zeal.appdata.xml /assets/freedesktop/org.zealdocs.zeal.appdata.xml
+58
View File
@@ -0,0 +1,58 @@
# https://snapcraft.io/docs
name: zeal
base: core24
adopt-info: zeal
summary: Offline documentation browser
description: |
Zeal is a simple offline documentation browser inspired by Dash.
It offers access to over 200 docsets covering various APIs and libraries.
title: Zeal
license: GPL-3.0-or-later
contact: https://go.zealdocs.org/l/contact
issues: https://github.com/zealdocs/zeal/issues
source-code: https://github.com/zealdocs/zeal
website: https://zealdocs.org
grade: stable
confinement: strict
lint:
ignore:
- library:
- usr/lib/**/libicuio.so.*
- usr/lib/**/libicutest.so.*
- usr/lib/**/libicutu.so.*
apps:
zeal:
command: usr/bin/zeal
extensions: [kde-neon-6]
plugs:
- home
- network
- opengl
- browser-support
environment:
# Chromium's sandbox conflicts with snap's confinement.
QTWEBENGINE_DISABLE_SANDBOX: "1"
parts:
zeal:
plugin: cmake
source: .
cmake-parameters:
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_BUILD_TYPE=Release
build-packages:
- extra-cmake-modules
- libarchive-dev
- libgl1-mesa-dev
- libsqlite3-dev
- libvulkan-dev
- libxcb-keysyms1-dev
stage-packages:
- libarchive13t64
- libsqlite3-0
- libxcb-keysyms1
override-build: |
craftctl default
craftctl set version=$(cat ${CRAFT_PART_BUILD}/zeal_version)
Symlink
+1
View File
@@ -0,0 +1 @@
pkg/snap