Skip to content

fix(release): diagnose npm auth before building, and allow re-publishing a tag - #11

Merged
phall1 merged 1 commit into
mainfrom
npm-preflight
Aug 9, 2026
Merged

fix(release): diagnose npm auth before building, and allow re-publishing a tag#11
phall1 merged 1 commit into
mainfrom
npm-preflight

Conversation

@phall1

@phall1 phall1 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Two releases have failed at the same point with 404 Not Found - PUT, and neither told us anything useful — npm reports "you cannot publish here" as a 404 so it doesn't leak whether a scope exists, which is indistinguishable from a typo'd package name.

The fact that would settle it — which account the token authenticates as — is never printed anywhere.

Preflight in verify: runs npm whoami, prints the authenticated account and the scope being published to, and fails with the real explanation if they disagree. Runs once, before four binaries get built, instead of failing four times at the end.

workflow_dispatch with a tag input: lets a failed publish be retried against an existing tag. Right now fixing a publish problem requires cutting a release to carry the fix, even when the released code is already correct — v0.14.1 already has the right package name.

Together these mean the next attempt either publishes, or tells us in one line who the token really is.

…ing a tag

Two releases have now failed at the same place with

  npm error 404 Not Found - PUT https://registry.npmjs.org/@phall%2fphui-...

npm reports 'you cannot publish here' as a 404 because it will not leak whether
a scope exists, which makes it indistinguishable from a typo'd package name.
Both times that cost a full release to learn nothing, because the one fact the
404 hides — which account the token authenticates as — is never printed.

The verify job now resolves that up front with npm whoami, prints both the
account and the scope being published to, and fails with the actual explanation
when they disagree. It runs once, before four binaries get built.

Also adds workflow_dispatch with a tag input, so a publish that failed for
reasons unrelated to the code can be retried against an existing tag without
cutting a release to carry the fix.
@phall1
phall1 merged commit 35a5513 into main Aug 9, 2026
1 check passed
@phall1
phall1 deleted the npm-preflight branch August 9, 2026 17:25
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