Files
effectcraft/.github/workflows/packaging-lint.yml
skylartaylor f20932b4f0 nightly: answer the Launcher's version form and run the crash helper first
The batch-2A review found two Rust bugs and one cleanup; all are fixed here.

- `prepare_launch` wired only `build_flavor::version_query`, so the Launcher's
  `--launch-profile nightly-v1 --profile-root <abs> --version` fell into the profile
  parser, opened the refusal dialog and exited 2 — the form `nightly-verify.sh`, the
  shared smoke and the Launcher's own check ask — and the unused
  `launch_profile::version_query` was dead code under `clippy -D warnings`. One
  `version_query` predicate answers both forms, with a test.
- `crash_report::start` re-runs this binary with `--internal-crash-reporter` and no
  profile tokens, which the Nightly flavor refused as a bare start on every launch (a
  native dialog, a 3 s readiness timeout, no crash reporting). `main` answers
  `crash_report::maybe_run` on the raw arguments first; `is_helper`/`helper_args` keep
  the predicate and the spawn in step, with a test.
- Deleted our dormant `nightly-dispatch.yml` and the signing-policy example (and its
  packaging-lint path); Dylan's enabled callers and the installed policy stay as he
  wrote them.

Review nits: presets are joined once (`<profile>/Presets`, not `<profile>/Presets/Presets`),
`nightly-macos.yml` uses the producer's craft-fonts pin, and a previous session's
interruption is no longer overwritten by the launch guard's graphics notice.
2026-11-25 00:00:26 +01:00

70 lines
3.0 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. Plus a
# Windows MSI install test with stub binaries (install folder, upgrade, repair, uninstall).
name: Packaging lint
on:
push:
branches: [main, release]
paths: [".github/workflows/**", "packaging/**", "assets/app-icon/**", ".github/nightly-signing-policy.json", ".github/nightly-linux-signing-key.asc", "sonar-project.properties"]
pull_request:
paths: [".github/workflows/**", "packaging/**", "assets/app-icon/**", ".github/nightly-signing-policy.json", ".github/nightly-linux-signing-key.asc", "sonar-project.properties"]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: packaging-lint-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
# Intentionally tracked at @main (not SHA-pinned) so org-wide CI improvements, security fixes, and build optimizations propagate without PR churn across all craftapp repos.
uses: storytold/craft-common-actions/.github/workflows/packaging-lint.yml@main
windows-install-policy:
timeout-minutes: 10
name: Windows installation policy (no app build)
runs-on: windows-latest
steps:
- name: Harden runner
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install the pinned packaging toolchain
shell: pwsh
run: |
$tools = Join-Path $env:RUNNER_TEMP 'craft-install-policy-wix'
dotnet tool install --tool-path $tools wix --version 5.0.2
if ($LASTEXITCODE -ne 0) { throw 'WiX installation failed.' }
$tools >> $env:GITHUB_PATH
$policy = Get-Content -Raw -LiteralPath packaging/windows/install-policy.json | ConvertFrom-Json
foreach ($extension in @($policy.extensions)) {
& (Join-Path $tools 'wix.exe') extension add -g "WixToolset.$extension.wixext/5.0.2"
if ($LASTEXITCODE -ne 0) { throw "WiX extension $extension installation failed." }
}
- name: Build and check non-executable installer fixtures
shell: pwsh
run: ./packaging/windows/test-install-policy.ps1 -OutputDirectory (Join-Path $env:RUNNER_TEMP 'craft-install-policy-tests')
nightly-source-contract:
name: Nightly source contracts (no build or signing)
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
steps:
- name: Harden runner
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Enforce nightly serialization and synthetic packaging contracts
run: python3 packaging/nightly-tests.py