ci(release): disable OIDC for bootstrap publish (0.1.1)#2
Conversation
The first run on main failed at `npm-publish-oidc` with `E404 PUT create-spectrum-project`. npm OIDC Trusted Publishing requires a trusted publisher to be configured on npmjs.com, which can only be set up *after* the package exists on the registry. So the first publish has to go via NPM_TOKEN. Switch `use-oidc` to false until `create-spectrum-project` is live on npm and the trusted publisher is configured, then flip back to true. v0.1.0 tag + GitHub release are intentionally left in place; this PR ships under the `release` label so the next run bumps to 0.1.1 and that's the first version that actually lands on npm. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details🔇 Additional comments (1)
📝 WalkthroughWalkthroughThe GitHub Actions release workflow for the ChangesRelease Workflow Authentication Mode
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Release workflow configuration to allow the initial npm publish to succeed by disabling npm OIDC trusted publishing during the bootstrap phase, falling back to token-based publishing until the package exists on the registry.
Changes:
- Set
use-oidctofalsein the Release reusable workflow inputs. - Added inline documentation explaining the bootstrap rationale and when to revert.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # so the chicken-and-egg gets resolved by bootstrapping with the token. | ||
| # Flip back to true once create-spectrum-project is live and the trusted | ||
| # publisher is configured for this repo + Release workflow on npmjs.com. | ||
| use-oidc: false |
Context
The first Release run on main (run #26429138962) failed at
npm-publish-oidc:The OIDC job's NPM_TOKEN fallback was used and got
E404on the PUT. The proximate cause is that npm OIDC Trusted Publishing needs a trusted publisher configured on npmjs.com for this repo + workflow, which can only be set up after the package exists on the registry. Classic chicken-and-egg.Change
use-oidc: true→use-oidc: false. First publish goes viaNPM_TOKEN(inherited org secret, same one spectrum-ts has access to). Flip back to true oncecreate-spectrum-projectis live on npm and the trusted publisher is configured.What happens on merge
This PR carries the
releaselabel, so merging triggers the Release workflow:release-infosees previous = 0.1.0 (from the existing tag on the failed run), classifies thisci:commit as patch → next = 0.1.1.bump-versionwrites0.1.1topackage.json, creates tagv0.1.1.github-releasecreates the release.npm-publish(non-OIDC path now) publishescreate-spectrum-project@0.1.1to public npm viaNPM_TOKEN.The dangling
v0.1.0tag + GitHub release stay as-is.0.1.1will be the first version actually on npm.Heads up (separate issues, not blocking)
npm warn publish "bin[create-spectrum-project]" script name dist/bin.js was invalid and removed.npm pkg fixwould resolve it locally. If that warning recurs and the bin entry gets stripped from the tarball,npm create spectrum-projectwon't work.package.jsonURLs now point atgithub.com/photon-hq/create-spectrum-projectbut the repo is still namedcreate-spectrum-app— those links 404 until the repo is renamed.If this run also fails with E404
That means the org
NPM_TOKENdoesn't have create-new-package rights (likely scoped to existing packages /@photon-hq/namespace). Fix is either (a) generate a broader token, (b) manually publish from local with a personal account, or (c) ship under the@photon-hq/scope.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit