Skip to content

publish: ship a game's preview pack as a second release asset#92

Merged
BCook98 merged 1 commit into
mainfrom
add-preview-publish
Jul 4, 2026
Merged

publish: ship a game's preview pack as a second release asset#92
BCook98 merged 1 commit into
mainfrom
add-preview-publish

Conversation

@BCook98

@BCook98 BCook98 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Publishes each changed game's preview loop alongside its wasm (companion to shellcade/shellcade#218 and shellcade/kit#75):

  • Build job (no-secrets, unchanged split): when games/<owner>/<game>/preview/ exists, pack it via the game's own pinned kit (shellcade-kit preview pack) and stage preview.scp. A preview dir that fails to pack — bad art, or a kit pin predating the subcommand — fails the job loudly rather than silently shipping without art. Games without the dir publish exactly as today.
  • Release job: attaches preview.scp as a second asset, pins preview-digest: sha256:<hex> in the notes after the untouched wasm digest: line, and extends the idempotency identity to the (wasm digest, preview digest) pair — an art-only change now cuts a release. The wasm-digest extraction is line-anchored so the two lines can't be confused regardless of order.
  • validate_game_dir.py: rejects a committed .scp (verified it previously slipped through — it's not .wasm, not executable, no native magic).

actionlint clean (only the pre-existing SC2016 info note from main).

⚠️ Merge sequencing

  1. Add preview package and "preview pack" CLI subcommand kit#75 must merge and release first (preview pack ships with the kit version games pin).
  2. Games carrying preview/ dirs (blackjack + salvo, blackjack, salvo: preview animation authoring sources #91) need their kit pins bumped to that release before their next publish, or the loud-failure path trips by design.
  3. Then this PR.

🤖 Generated with Claude Code

When a game dir contains a preview/ authoring dir (preview.yaml + text
frames), the build job now packs it into a preview.scp via the same
pinned-kit kit() helper it uses for `check`, staging it next to the wasm.
If the dir exists but packing fails (bad art, or the game's pinned kit
predates `preview pack`), the job fails loudly rather than shipping a
game without its art. Games with no preview/ dir are unchanged.

The release job attaches preview.scp as a second asset, pins a
`preview-digest: sha256:<hex>` line right after the wasm digest, and
makes the release identity the PAIR (wasm digest, preview digest) so an
art-only change cuts a new release. Absent preview compares as "", so
releases with no preview keep today's semantics and an old release
predating preview packing reads as changed once a preview appears.

validate_game_dir.py now rejects a stray committed .scp (the packed
output) as a build artifact; the preview/ sources still pass. The
two-job secrets/game-code split and the game:publish notify are
untouched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BCook98 BCook98 merged commit f0d5a75 into main Jul 4, 2026
3 checks passed
@BCook98 BCook98 deleted the add-preview-publish branch July 4, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant