ci: fix Yarn install with npm OIDC - #25
Conversation
|
kudanai
left a comment
There was a problem hiding this comment.
Verified the mechanism: id-token: write is still present so OIDC publishing is unaffected — it auto-detects from the CI environment + id-token permission and doesn't need registry-url. publishConfig has no registry override, so npm publish defaults to registry.npmjs.org on its own. Dropping registry-url removes the //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} line that setup-node writes into .npmrc, which is exactly what Yarn 1's frozen install was choking on. setup-node SHA confirmed as v7.0.0, and no changeset is correct for a CI-only change. The inline comment explaining why the line must stay absent is the right call. LGTM 🚀
Summary
setup-nodefrom generating an npm auth placeholder that Yarn 1 cannot resolve in tokenless OIDC workflowsregistry-urlmust stay absentContext
Dependabot PR #23 upgraded
setup-nodeto v7, which removed its dummyNODE_AUTH_TOKENexport. The subsequent release run failed during the frozen Yarn install:When
registry-urlis set,setup-nodewrites${NODE_AUTH_TOKEN}into its generated npm configuration. Yarn 1 treats the missing environment variable as fatal. npm already defaults toregistry.npmjs.org, andchangesets/actiondetects OIDC independently.Version 1.3.0 is already published; this change only restores future release runs.
Validation
git diff --checkyarn prettier --check .github/workflows/release.ymlyarn install --frozen-lockfileyarn testNo changeset is included because this only changes CI configuration.