Files
qbz/.github/workflows/release-snap.yml
T
vicrodh 89030b5b2a ci: snap packs the AppDir; remove the Launchpad source recipe
core24 ships Qt 6.4.2 and the tree needs 6.8, so neither stage-packages
nor a remote source build can provide Qt: the dump recipe now takes the
AppDir tree from build-qt-linux.yml (both arches) and the root
snapcraft.yaml plus its packaging/snap symlink are deleted. snap-slint
becomes snap-qt with the non-Qt runtime only.

cc
2026-08-26 19:11:01 -06:00

151 lines
5.2 KiB
YAML

name: release-snap
# All-hosted Snap pipeline — BOTH arches. Each track = build (the shared
# build-qt-linux.yml, which yields the self-contained AppDir) -> dump-pack ->
# publish. No compilation in snapcraft; the pack runs in seconds on a runner
# with snapd. This CI upload is the SOLE publish path: the Launchpad /
# "Build from GitHub" source recipe (root snapcraft.yaml) is DELETED — core24
# has Qt 6.4.2 and the tree needs 6.8, so a source build there cannot even
# resolve its dependencies (it OOM'd on their amd64 fleet in the Slint era
# anyway).
#
# Rewritten 2026-08-25 for the Slint -> Qt frontend switch.
on:
workflow_dispatch:
inputs:
tag:
description: "Release tag to package (e.g. v2.1.0). Defaults to the pushed tag."
required: false
type: string
channel:
description: "Snap Store channel"
required: false
default: edge
type: choice
options: [edge, beta, candidate, stable]
push:
tags:
- "v*"
# A tag never builds twice; distinct tags never cancel each other. Never abort a
# half-published release.
concurrency:
group: release-snap-${{ github.ref }}
cancel-in-progress: false
jobs:
build-amd64:
uses: ./.github/workflows/build-qt-linux.yml
with:
arch: x86_64
build-arm64:
uses: ./.github/workflows/build-qt-linux.yml
with:
arch: aarch64
snap:
needs: build-amd64
runs-on: ubuntu-24.04
# No compilation here; the headroom is for snapcraft's LXD bootstrap,
# which is highly variable on hosted runners (a 30 min cap got the
# v2.0.0 run axed mid-pack).
timeout-minutes: 90
# Credentials at job level so the publish step can gate on them: an empty /
# unset secret SKIPS publish instead of failing the whole run.
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
steps:
- uses: actions/checkout@v7
- name: Download AppDir
uses: actions/download-artifact@v8
with:
name: qbz-appdir-x86_64
- name: Stage snap payload (AppDir tree + desktop + icon) and recipe
run: |
set -eux
TAG="${{ github.event.inputs.tag || github.ref_name }}"
VER="${TAG#v}"
tar -xf appdir.tar
mkdir -p snap-payload
cp -a AppDir/usr/bin AppDir/usr/lib AppDir/usr/plugins AppDir/usr/qml snap-payload/
cp packaging/snap/snap/gui/qbz.desktop snap-payload/qbz.desktop
cp packaging/snap/snap/gui/qbz.png snap-payload/qbz.png
mkdir -p snap
cp packaging/snap-qt/snapcraft.yaml snap/snapcraft.yaml
sed -i "s/^version:.*/version: '${VER}'/" snap/snapcraft.yaml
# Belt and braces: no root recipe may shadow snap/snapcraft.yaml.
rm -f snapcraft.yaml .snapcraft.yaml
echo "Built snap version: ${VER}"
head -20 snap/snapcraft.yaml
- name: Build the snap (dump of the prebuilt AppDir)
id: build
uses: snapcore/action-build@v1
- name: Upload .snap artifact
uses: actions/upload-artifact@v7
with:
name: qbz-snap-amd64
path: ${{ steps.build.outputs.snap }}
if-no-files-found: error
- name: Publish to the Snap Store (skipped when no store credentials)
if: ${{ env.SNAPCRAFT_STORE_CREDENTIALS != '' }}
uses: snapcore/action-publish@v1
with:
snap: ${{ steps.build.outputs.snap }}
release: ${{ github.event.inputs.channel || 'edge' }}
snap-arm64:
needs: build-arm64
runs-on: ubuntu-24.04-arm
timeout-minutes: 90
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
steps:
- uses: actions/checkout@v7
- name: Download AppDir
uses: actions/download-artifact@v8
with:
name: qbz-appdir-aarch64
- name: Stage snap payload (AppDir tree + desktop + icon) and recipe
run: |
set -eux
TAG="${{ github.event.inputs.tag || github.ref_name }}"
VER="${TAG#v}"
tar -xf appdir.tar
mkdir -p snap-payload
cp -a AppDir/usr/bin AppDir/usr/lib AppDir/usr/plugins AppDir/usr/qml snap-payload/
cp packaging/snap/snap/gui/qbz.desktop snap-payload/qbz.desktop
cp packaging/snap/snap/gui/qbz.png snap-payload/qbz.png
mkdir -p snap
cp packaging/snap-qt/snapcraft-arm64.yaml snap/snapcraft.yaml
sed -i "s/^version:.*/version: '${VER}'/" snap/snapcraft.yaml
rm -f snapcraft.yaml .snapcraft.yaml
echo "Built snap version: ${VER} (arm64)"
head -20 snap/snapcraft.yaml
- name: Build the snap (dump of the prebuilt AppDir)
id: build
uses: snapcore/action-build@v1
- name: Upload .snap artifact
uses: actions/upload-artifact@v7
with:
name: qbz-snap-arm64
path: ${{ steps.build.outputs.snap }}
if-no-files-found: error
- name: Publish to the Snap Store (skipped when no store credentials)
if: ${{ env.SNAPCRAFT_STORE_CREDENTIALS != '' }}
uses: snapcore/action-publish@v1
with:
snap: ${{ steps.build.outputs.snap }}
release: ${{ github.event.inputs.channel || 'edge' }}