Skip to content

Fix npm OIDC trusted publishing: trailing slash in publishConfig.registry - #17

Merged
andrew-welker merged 5 commits into
mainfrom
copilot/check-trusted-publishing-run
Aug 21, 2026
Merged

Fix npm OIDC trusted publishing: trailing slash in publishConfig.registry#17
andrew-welker merged 5 commits into
mainfrom
copilot/check-trusted-publishing-run

Conversation

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown

@semantic-release/npm@13.1.5 uses strict equality to gate the OIDC path: OFFICIAL_REGISTRY === registry, where OFFICIAL_REGISTRY = "https://registry.npmjs.org/" (trailing slash). With publishConfig.registry set to "https://registry.npmjs.org" (no trailing slash), this check was always false — OIDC was silently bypassed, falling through to token auth which also failed.

The Trusted Publisher was correctly configured on npmjs.org; the mismatch was entirely on the client side.

Changes

  • package.json — Add trailing slash to publishConfig.registry so it matches OFFICIAL_REGISTRY exactly, allowing oidcContextEstablished() to proceed to the OIDC token exchange
  • build.yaml — Revert registry-url on setup-node (re-added by a previous fix attempt); it is not needed and actively harmful — it writes a .npmrc auth token entry that causes @semantic-release/npm to skip OIDC and attempt npm whoami with an unset NODE_AUTH_TOKEN

Copilot AI and others added 2 commits August 21, 2026 03:45
…release/npm OIDC auth

Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com>
…, remove registry-url

Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com>
@andrew-welker

Copy link
Copy Markdown

@copilot add an empty commit with a valid conventional commit message. Also, add instructions in this repo so that agents ALWAYS use conventional commit syntax.

Copilot AI and others added 2 commits August 21, 2026 04:04
Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com>
Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com>

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown
Author

@copilot add an empty commit with a valid conventional commit message. Also, add instructions in this repo so that agents ALWAYS use conventional commit syntax.

Done in commits docs(ci): add copilot-instructions with conventional commit requirements and chore: trigger release pipeline.

The .github/copilot-instructions.md file documents the full Conventional Commits convention (allowed types, scopes, breaking-change syntax, and examples) so all Copilot agents in this repository will use it going forward.

@andrew-welker

Copy link
Copy Markdown

@copilot based on the releaserc.json, and standard conventional commit syntax, chore: won't trigger a version increment. Use fix, or feat.

Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com>

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown
Author

@copilot based on the releaserc.json, and standard conventional commit syntax, chore: won't trigger a version increment. Use fix, or feat.

Amended to fix: trigger release pipeline with OIDC trusted publishing fix — this will satisfy semantic-release's fix release rule and trigger a patch version increment.

@andrew-welker
andrew-welker marked this pull request as ready for review August 21, 2026 04:11
@andrew-welker
andrew-welker merged commit 1549d88 into main Aug 21, 2026
1 check passed
@andrew-welker
andrew-welker deleted the copilot/check-trusted-publishing-run branch August 21, 2026 04:12
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.

2 participants