mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-27 11:27:21 -06:00
* Flatpak single-file bundle as a release artifact (#140) packaging/linux/flatpak/ai.storyteller.photocraft.bundle.yml repackages the release's Linux tarball (no Rust build, no network) on the freedesktop 26.08 runtime; packaging/linux/flatpak-bundle.sh builds it with flatpak-builder and flatpak build-bundle and smoke-tests it. release.yml gains a Flatpak job per arch that feeds the draft release and SHA256SUMS. The Flathub manifest moves to 26.08 with the same documented finish-args (portals + Pictures/Documents), and packaging-lint checks the two manifests agree. Font scanning also looks in /run/host/fonts and /run/host/user-fonts so host fonts show up in the sandbox. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Docs: installing the Flatpak bundle (#140) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Flatpak job: install the SVG pixbuf loader for appstream compose Without librsvg2-common (absent on the x86_64 runner image) the host's appstreamcli compose fails with file-read-error on the scalable icon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * release.yml: the Flatpak job runs without the release environment It only repackages the Linux job's tarball and signs nothing, so it doesn't need (and shouldn't hold) the signing secrets while running third-party tooling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
63 lines
2.8 KiB
YAML
63 lines
2.8 KiB
YAML
# Quick static checks for the release pipeline (seconds, no Rust build): workflow syntax,
|
|
# packaging shell/PowerShell scripts, and the Linux desktop/AppStream/Flatpak metadata.
|
|
name: Packaging lint
|
|
|
|
on:
|
|
push:
|
|
branches: [main, release]
|
|
paths: [".github/workflows/**", "packaging/**", "assets/app-icon/**"]
|
|
pull_request:
|
|
paths: [".github/workflows/**", "packaging/**", "assets/app-icon/**"]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: packaging-lint-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
ACTIONLINT_VERSION: 1.7.12
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install tools
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends shellcheck desktop-file-utils appstream libxml2-utils python3-yaml
|
|
curl -fsSL "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz" \
|
|
| tar -xz -C "$RUNNER_TEMP" actionlint
|
|
- name: actionlint
|
|
run: |
|
|
"$RUNNER_TEMP/actionlint" -color
|
|
- name: shellcheck
|
|
run: shellcheck packaging/*.sh packaging/*/*.sh
|
|
- name: PowerShell
|
|
shell: pwsh
|
|
run: |
|
|
foreach ($f in Get-ChildItem packaging/windows/*.ps1) {
|
|
$errors = $null
|
|
[System.Management.Automation.Language.Parser]::ParseFile($f.FullName, [ref]$null, [ref]$errors) | Out-Null
|
|
if ($errors) { $errors | ForEach-Object { Write-Output "::error file=$($f.Name)::$_" }; exit 1 }
|
|
Write-Output "ok $($f.Name)"
|
|
}
|
|
- name: XML, desktop entry, AppStream, Flatpak manifest
|
|
run: |
|
|
xmllint --noout packaging/windows/photocraft.wxs packaging/macos/*.plist* packaging/linux/*.xml*
|
|
desktop-file-validate packaging/linux/ai.storyteller.photocraft.desktop
|
|
sed -e 's/@VERSION@/0.0.0/' -e 's/@DATE@/2026-01-01/' packaging/linux/ai.storyteller.photocraft.metainfo.xml.in >"$RUNNER_TEMP/ai.storyteller.photocraft.metainfo.xml"
|
|
appstreamcli validate --no-net --explain "$RUNNER_TEMP/ai.storyteller.photocraft.metainfo.xml"
|
|
python3 - <<'EOF'
|
|
import yaml
|
|
src = yaml.safe_load(open("packaging/linux/flatpak/ai.storyteller.photocraft.yml"))
|
|
bundle = yaml.safe_load(open("packaging/linux/flatpak/ai.storyteller.photocraft.bundle.yml"))
|
|
for m in (src, bundle):
|
|
assert m["id"] == "ai.storyteller.photocraft" and m["command"] == "photocraft", m["id"]
|
|
for key in ("runtime", "runtime-version", "sdk", "finish-args"):
|
|
assert src[key] == bundle[key], f"Flatpak manifests disagree on {key}: {src[key]} vs {bundle[key]}"
|
|
print("Flatpak manifests ok")
|
|
EOF
|