Document why the Release workflow fails on a new repo#13
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the repo-provisioning work. Answering "do we tell the user about this?" — we didn't, really.
The gap
The changesets
Releaseworkflow runs on every push, so a repo created with--githubfails a job within a minute of existing, withENEEDAUTH. 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
## Releasingsection 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
Publishworkflow only runs onv*(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