# 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 # enable on PRs when M4 starts (docs/ROADMAP.md) on: 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 packaging/linux/AppRun - name: AppImage AppRun desktop integration run: bash packaging/linux/apprun-test.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)" } ./packaging/windows/check-icons.ps1 - name: FreeBSD package layout (dry run, no build) run: bash packaging/freebsd/package.sh --dry-run - name: Package metadata names only this app run: | other=$(grep -rhoiIE '[a-z]*craft[a-z_-]*' packaging/ .github/ | tr '[:upper:]' '[:lower:]' | grep -vE '^(craft|artcraft|getartcraft|craftrules|launchcraftanything|craft[-_]?anything.*)$' | sort -u) if [ -n "$other" ]; then echo "::error::package metadata names another app: $other" exit 1 fi - name: XML, desktop entry, AppStream, Flatpak manifest run: | xmllint --noout packaging/windows/craft-anything.wxs packaging/windows/craft-anything.en-us.wxl packaging/macos/*.plist* packaging/linux/*.xml* desktop-file-validate packaging/linux/ai.storyteller.craft-anything.desktop sed -e 's/@VERSION@/0.0.0/' -e 's/@DATE@/2026-01-01/' packaging/linux/ai.storyteller.craft-anything.metainfo.xml.in >"$RUNNER_TEMP/ai.storyteller.craft-anything.metainfo.xml" appstreamcli validate --no-net --explain "$RUNNER_TEMP/ai.storyteller.craft-anything.metainfo.xml" python3 - <<'EOF' import yaml src = yaml.safe_load(open("packaging/linux/flatpak/ai.storyteller.craft-anything.yml")) bundle = yaml.safe_load(open("packaging/linux/flatpak/ai.storyteller.craft-anything.bundle.yml")) for m in (src, bundle): assert m["id"] == "ai.storyteller.craft-anything" and m["command"] == "craft-anything", 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