Skip to content

Document why the Release workflow fails on a new repo#13

Merged
DanMat merged 2 commits into
mainfrom
feat/document-npm-credentials
Jul 21, 2026
Merged

Document why the Release workflow fails on a new repo#13
DanMat merged 2 commits into
mainfrom
feat/document-npm-credentials

Conversation

@DanMat

@DanMat DanMat commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Follow-up to the repo-provisioning work. Answering "do we tell the user about this?" — we didn't, really.

The gap

The changesets Release workflow runs on every push, so a repo created with --github fails a job within a minute of existing, with ENEEDAUTH. The only explanation anywhere in the generated project was a comment inside the workflow YAML:

# add NPM_TOKEN as a repo secret, or use npm Trusted Publishing (OIDC)

That's not where anyone looks when they see a red X on a ten-second-old repo. Nothing in the README, nothing in the CLI output.

Change

A ## Releasing section in the generated README that names the exact error and both fixes, recommending Trusted Publishing (OIDC) over a stored token since there's no secret to rotate.

It's only emitted when a publish workflow is actually included, and it's worded for whichever one you got — the changesets workflow runs on push (so it fails immediately), while the tag-triggered Publish workflow only runs on v* (so it doesn't fail until you tag). Saying "fails on every push" for the tag-based one would be wrong.

Also added to the CLI's post-scaffold hints, but only when we just created the repo — that's the moment the failure actually shows up.

Testing

Two tests: the section appears with the credential guidance for a publishable preset, and is absent for react-app, which publishes nothing. 43 tests pass.

🤖 Generated with Claude Code

DanMat and others added 2 commits July 21, 2026 16:44
The changesets Release workflow runs on every push, so a brand-new repo
fails a job within a minute of being created. The only explanation was a
comment inside the generated YAML — somewhere nobody looks when they see
a red X on a repo that is ten seconds old.

Add a "Releasing" section to the generated README naming the exact error
(ENEEDAUTH) and both fixes, recommending Trusted Publishing over a stored
token. Only emitted when a publish workflow is actually included, and
worded for whichever one you got: changesets runs on push, the tag-based
Publish workflow only on `v*`.

Also surfaced in the CLI's post-scaffold hints when we just created the
repo, since that is the moment the failure appears.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The web configurator ships a bundled copy of the core generator, so any
change to generated output has to be rebuilt and committed. CI enforces
this with bundle-fresh, which caught it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@DanMat
DanMat merged commit 649de9f into main Jul 21, 2026
31 checks passed
@DanMat
DanMat deleted the feat/document-npm-credentials branch July 21, 2026 23:33
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