-
-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Description
The current release workflow publishes to npm with the NPM_TOKEN GitHub secret. That token appears to be long-lived and manual to rotate, and it just caused a failed release when npm rejected the publish attempt for codehike@1.1.0.
We should migrate the release pipeline to npm trusted publishing with GitHub Actions OIDC so releases do not depend on a stored granular token.
Context:
- Current workflow:
.github/workflows/release-pr-merged.yml - Current release script:
.github/scripts/release.mjs - Current behavior: workflow injects
NPM_TOKEN, writes~/.npmrc, and runschangeset publish - Recent failure: GitHub Actions run
23185679623, job67368464586
Proposed changes:
- Add
id-token: writepermission to the release job - Stop passing
NPM_TOKENinto the workflow - Remove the
.npmrctoken-writing step fromrelease.mjs - Ensure the publish environment uses an npm CLI version supported by npm trusted publishing
- Configure
codehikeon npm to trust publishes from this repo/workflow
Acceptance criteria:
- Release workflow can publish
codehikewithoutNPM_TOKEN - GitHub Actions release run succeeds using npm trusted publishing
NPM_TOKENsecret can be deleted after one successful release
Notes:
- This is a small code change but requires matching npm-side trusted publisher configuration for the exact repo/workflow.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels