Skip to content

ci(publish): switch to npm trusted publisher (OIDC), remove NPM_TOKEN#8

Merged
0xkkkn merged 1 commit into
mainfrom
chore/dev-132-npm-trusted-publisher
May 7, 2026
Merged

ci(publish): switch to npm trusted publisher (OIDC), remove NPM_TOKEN#8
0xkkkn merged 1 commit into
mainfrom
chore/dev-132-npm-trusted-publisher

Conversation

@0xkkkn

@0xkkkn 0xkkkn commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the NODE_AUTH_TOKEN env var from the publish step and relies on npm's Trusted Publisher (OIDC) flow. The npm-side trust between @privara/sdk and this repo's publish.yml is already configured.

Why

The previous NPM_TOKEN secret (Automation token) expired after ~2 months. The workflow run for v0.2.1 failed at the publish step:

npm error 404 Not Found - PUT https://registry.npmjs.org/@privara%2fsdk - Not found
npm error 404  '@privara/sdk@0.2.1' is not in this registry.

Trusted Publishers replaces the static long-lived token with a per-run OIDC token issued by GitHub Actions. No secrets to rotate, no expirations.

What

  • Removes the env: NODE_AUTH_TOKEN block from the publish step in .github/workflows/publish.yml.
  • All other steps (lint/typecheck/test/build) unchanged.
  • permissions: id-token: write is already in place.

Test plan

  • After merge, force-update tag v0.2.1 to point at this commit (or push a new tag) — workflow re-runs with OIDC and publishes @privara/sdk@0.2.1.
  • Optionally delete the old NPM_TOKEN secret from repo settings (no longer used).

Linked

@0xkkkn
0xkkkn requested a review from a team as a code owner May 7, 2026 16:52
@0xkkkn
0xkkkn merged commit 4ce07b6 into main May 7, 2026
1 check passed
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