Skip to content

fix(ci): force OIDC-only npm publish path#9

Merged
stevenobiajulu merged 1 commit intomainfrom
tweak-release-force-oidc-publish
Feb 25, 2026
Merged

fix(ci): force OIDC-only npm publish path#9
stevenobiajulu merged 1 commit intomainfrom
tweak-release-force-oidc-publish

Conversation

@stevenobiajulu
Copy link
Member

Summary

  • remove implicit registry auth wiring from setup-node in release workflow
  • explicitly clear token-based npm auth before publish and npx fetches
  • keep trusted publishing (OIDC provenance) as the only publish path

Why

Release publish was failing with token-style auth errors (expired/revoked token path), even though trusted publishing was configured. This change prevents fallback to token auth so npm uses OIDC consistently.

Validation

  • release workflow syntax remains valid
  • change is isolated to .github/workflows/release.yml

Release publish was falling back to token auth and failing with expired/revoked token errors despite trusted publishers being configured.\n\nMake trusted publishing the primary and only publish path by removing setup-node registry auth wiring and explicitly clearing NODE_AUTH_TOKEN/_authToken before npm publish. This prevents token fallback and keeps publish on OIDC + provenance.
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@stevenobiajulu stevenobiajulu merged commit 60ccaac into main Feb 25, 2026
10 checks passed
@stevenobiajulu stevenobiajulu deleted the tweak-release-force-oidc-publish branch February 25, 2026 21:57
stevenobiajulu added a commit that referenced this pull request Feb 25, 2026
Trusted publishing with npm now requires a Node 22.14+ runtime. The release jobs were running on Node 20, so npm did not enter OIDC trusted-publishing mode and failed with ENEEDAUTH (interactive auth required).\n\nThis updates all release workflow jobs to Node 22 so the publish step can use OIDC provenance instead of manual npm login.\n\nRef: #9
stevenobiajulu added a commit that referenced this pull request Feb 25, 2026
)

Trusted publishing with npm now requires a Node 22.14+ runtime. The release jobs were running on Node 20, so npm did not enter OIDC trusted-publishing mode and failed with ENEEDAUTH (interactive auth required).\n\nThis updates all release workflow jobs to Node 22 so the publish step can use OIDC provenance instead of manual npm login.\n\nRef: #9
stevenobiajulu added a commit that referenced this pull request Feb 25, 2026
Even with Node 22 and id-token permissions, npm publish was failing in release with ENEEDAUTH, meaning trusted publishing was not being engaged.\n\nsetup-node's registry-url configuration is part of npm's recommended trusted publishing setup. This restores registry-url in all release jobs while keeping token cleanup to avoid stale token fallback.\n\nRef: #9
stevenobiajulu added a commit that referenced this pull request Feb 25, 2026
Even with Node 22 and id-token permissions, npm publish was failing in release with ENEEDAUTH, meaning trusted publishing was not being engaged.\n\nsetup-node's registry-url configuration is part of npm's recommended trusted publishing setup. This restores registry-url in all release jobs while keeping token cleanup to avoid stale token fallback.\n\nRef: #9
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