Skip to content

ci: publish via npm trusted publishing (OIDC), retire NPM_TOKEN#1

Merged
MichaelTaylor3d merged 1 commit into
mainfrom
ci/npm-oidc-trusted-publishing
Jul 7, 2026
Merged

ci: publish via npm trusted publishing (OIDC), retire NPM_TOKEN#1
MichaelTaylor3d merged 1 commit into
mainfrom
ci/npm-oidc-trusted-publishing

Conversation

@MichaelTaylor3d

Copy link
Copy Markdown
Contributor

What changed

Converts .github/workflows/publish-npm.yml from token-based npm auth to npm Trusted Publishing (OIDC), per #201 (ecosystem-wide token-retirement sweep):

  • permissions: gains id-token: write (kept contents: read).
  • actions/setup-node bumped to node-version: "22" (trusted publishing requires Node >= 22.14.0); registry-url unchanged.
  • Added a step before publish that upgrades npm to >= 11.5.1 (npm install -g npm@latest) — Node 22 bundles npm 10, and trusted publishing requires npm CLI >= 11.5.1.
  • Removed the env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} block from the publish step — OIDC is auto-detected by npm CLI, no token needed. No --provenance flag added (automatic under trusted publishing).
  • Updated the workflow header comment to describe OIDC trusted-publishing auth instead of NPM_TOKEN.

No change to triggers, build steps, or what gets published.

Version bump

Patch bump 0.1.2 -> 0.1.3 (ci: change, no public-API/behaviour change) — required by the version-increment CI gate even for a workflow-only change.

Post-merge expectation

On merge, tag-on-merge fires publish-npm.yml for v0.1.3. The OIDC publish will only succeed once the npm-side trusted publisher is configured for org DIG-Network, repo components, workflow publish-npm.yml, package @dignetwork/components. If that config isn't in place yet, the publish run is expected to fail with an OIDC/auth error — this is expected-pending, not a regression, and will resolve once the npm trusted-publisher config is added.

@MichaelTaylor3d MichaelTaylor3d merged commit 060e924 into main Jul 7, 2026
8 checks passed
@MichaelTaylor3d MichaelTaylor3d deleted the ci/npm-oidc-trusted-publishing branch July 7, 2026 19:28
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