Skip to content

Stage the npm package from a file path, and check staging before a release - #48

Merged
mwhitham merged 2 commits into
mainfrom
fix/release-stage-path
Nov 24, 2026
Merged

mwhitham merged 2 commits into
mainfrom
fix/release-stage-path

Conversation

@mwhitham

Copy link
Copy Markdown
Owner

The v2.1.3 release passed the full check, then stopped at npm staging. Nothing reached npm, and no GitHub release was made. This fixes the staging step.

What went wrong

The staging step ran npm stage publish "npm-tarball/athleticstandard-2.1.3.tgz". npm 12 reads a path of the form name/file as a GitHub repository, so it refused with EALLOWGIT ... Refusing to fetch "github:npm-tarball/athleticstandard-2.1.3.tgz". No earlier release run had reached this step.

The fix

  • The path now starts with ./, so npm reads it as a file.
  • The tested commit is now tagged after the package is staged. A failed staging then leaves no tag, so a fixed workflow can release the same version again. The failed run left v2.1.3 on the Version 2.1.3: an optional host for sharing a record #47 merge commit, which blocks the next release until it is removed.
  • The full check (validate.yml) now runs the same staging command with --dry-run, with the same Node and npm, so this kind of mistake fails before a release tags anything. The job holds no npm credential and sends nothing to npm.

How it was checked

  • The release's own tarball (athleticstandard-2.1.3.tgz, SHA-256 f81e9eea…) was downloaded from the failed run and staged with npm 12.2.3 in dry-run mode, with no npm login. The old command fails with the same EALLOWGIT error. The new command reads the file (64 files, 16.6 MB) and stages athleticstandard@2.1.3 under latest.
  • Release cross-platform runs on this branch with publish off, so the new dry-run job runs on GitHub's runner.
  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test (786 passed), and the npm ci, typecheck, and test steps (101 passed) pass.

Not checked

A dry run cannot test the npm trusted publisher, which signs the workflow in to npm. npm 12 gives a trusted publisher two separate permissions, publish and stage publish, and both are off unless chosen. This package has never been published from a workflow, so check that its trusted publisher allows stage publish before releasing.

🤖 Generated with Claude Code

mwhitham and others added 2 commits November 23, 2026 22:15
npm read `npm-tarball/<file>` as a GitHub repository and refused to
fetch it, so the v2.1.3 release stopped at staging. The path now starts
with `./`. The tested commit is now tagged after the package is staged,
so a failed staging leaves no tag and a fixed workflow can release the
same version again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release stages the packed tarball with `npm stage publish`. The full
check now runs the same command with `--dry-run`, with the same Node and
npm, so a command that cannot read the file fails before a release tags
anything. The job holds no npm credential and sends nothing to npm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mwhitham
mwhitham merged commit 53211f7 into main Nov 24, 2026
24 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in ATH: Athletic Standard Nov 24, 2026
@github-actions

Copy link
Copy Markdown

v2.1.3 is ready to release. main now holds version 2.1.3, which has no tag yet.

To release it, comment /release on this pull request. Only a repository admin's comment works.

The release then runs by itself:

  1. The full check runs on Linux, macOS, and Windows. This takes a while.
  2. The tested commit is tagged v2.1.3, and the native archives become a GitHub release.
  3. The npm package is staged. Nobody can install it yet.
  4. This pull request gets a comment saying how to approve it on npm with your two-factor code.

You can also start it from Actions → Release cross-platform → Run workflow on main, with publish ticked, on the website or in GitHub Mobile.

@mwhitham

Copy link
Copy Markdown
Owner Author

/release

@github-actions

Copy link
Copy Markdown

Started the release of v2.1.3 from main (53211f7). Follow it under Release cross-platform. The full check takes a while. When it finishes, this pull request gets a comment saying how to approve the npm package.

@github-actions

Copy link
Copy Markdown

v2.1.3 is staged on npm and waiting for your approval.

The full check passed. v2.1.3 now names the tested commit, and the GitHub release holds the native archives. Nobody can install v2.1.3 from npm until you approve it.

Approve it in one of two ways. Both ask for your two-factor code.

  • On npmjs.com: sign in, open athleticstandard, and approve the staged version.
  • In a terminal: npm stage list athleticstandard, then npm stage approve <stage-id>.

Then check it from any folder: npx -y athleticstandard@2.1.3 --version

Release run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant