Skip to content

Smoke the npm install after every publish and include it in the release announcement - #14

Merged
Astroricks merged 11 commits into
mainfrom
yuez/release-smoke-after-publish
Nov 13, 2026
Merged

Astroricks merged 11 commits into
mainfrom
yuez/release-smoke-after-publish

Conversation

@Astroricks

@Astroricks Astroricks commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The release smoke that installs @square/cli from npm on every platform runs only when the person releasing starts it by hand, from a copy of the workflow on a throwaway branch. Meanwhile notify posts ✅ as soon as npm publish returns, even if some platforms can't install the release yet. With v0.4.19, the Linux x64 and Windows platform tarballs returned 404 for about 15 minutes after the publish.

Solution

smoke.yml lives on main as the Release smoke workflow, with workflow_dispatch (a draft release, before publishing) and workflow_call (Publish to npm, after publishing). It never signs in.

  • Each mode is its own matrix job on macOS arm64 and x64, Linux x64 and arm64, and Windows x64. Both share one matrix and step list through YAML anchors. The checks are the same as before: checksums, the npm install (release only), offline commands, the command count, skills, and the Apps starter build.
  • release, the automatic one, runs with no token scopes, since it runs npm and the starter's dependencies. It downloads from the unauthenticated URLs users use.
  • draft keeps contents: write, which reading a draft release needs. It runs only when dispatched by hand before publishing. Each job downloads straight from the draft, so unpublished binaries never become a run artifact, which anyone can download on a public repo.
  • The npm install retries every minute for 30 minutes, because npm can take that long to serve every tarball. The job timeout is 60 minutes.
  • The starter builds with the pnpm version its packageManager field pins, so a new pnpm release can't fail the smoke.
  • Drafts are always smoke-v<version>, so the tag is derived rather than passed in.

Publish to npm calls it in a new smoke job after publish. It runs for release events and for manual re-publishes (dry_run off), not for dry runs. publish exposes the version as a job output.

notify waits for both jobs and posts one message:

  • ❌ npm publish failed, as before
  • ❌ on npm, but the install smoke failed
  • ✅ out on GitHub and npm, and installs on every platform

It now also runs for manual re-publishes, so a recovery gets announced. conclusion in the payload is the result of whichever stage decided the message.

Concurrency moves onto the publish job, with queue: max. A release run no longer holds the slot while its smoke runs. The default queue keeps only the newest waiting run and cancels the others, which could have dropped a release's publish when a later dispatch arrived.

Test Steps

  • actionlint 1.7.12 passes on both workflows, apart from concurrency.queue, a key it doesn't recognize yet.
  • A temporary workflow on this branch called smoke.yml exactly as Publish to npm does: contents: read at the workflow level, contents: write on the calling job. It ran source: release against v0.4.19 and source: draft against a draft copy of v0.4.19's assets. All 10 platform jobs passed and the run left no artifacts. An earlier run included a job using queue: max, which GitHub accepted. The log shows the starter's pnpm@10.32.1 was installed. The temporary workflow, the draft and the runs are deleted.
  • The retry loop, run locally with stub npm and square commands, passed once the stub started serving and failed after the last attempt when it never did.
  • The full Publish to npm path (smoke after a real publish, then notify) runs for the first time on the next release.

🤖 Generated with Claude Code

@Astroricks
Astroricks marked this pull request as ready for review November 13, 2026 02:48
@Astroricks
Astroricks merged commit 4f25cba into main Nov 13, 2026
2 checks passed
@Astroricks
Astroricks deleted the yuez/release-smoke-after-publish branch November 13, 2026 23:42
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