Skip to content

release: migrate npm publication to Trusted Publishing OIDC #179

Description

@pitimon

Problem

The post-merge npm workflow for 0.39.51 reached npm publish but the registry returned E404 on the package PUT. The repository NPM_TOKEN was copied from the local granular token, but that token is IP-restricted for local release recovery and cannot authenticate from a GitHub-hosted runner.

Evidence:

No token value or allowed IP range is recorded here.

Durable fix

Migrate .github/workflows/npm-publish.yml to npm Trusted Publishing/OIDC:

  1. On npmjs.com, configure the package trusted publisher for:
    • GitHub owner/user: pitimon
    • repository: TokenTracker
    • workflow filename: npm-publish.yml
    • allowed action: npm publish
  2. Use Node >=22.14 and npm >=11.5.1 in the publish job.
  3. Grant the publish job id-token: write and contents: read.
  4. Remove NODE_AUTH_TOKEN/NPM_TOKEN from the publish step.
  5. Publish a patch version from GitHub Actions and verify the registry smoke receipt.
  6. Remove the unusable GitHub NPM_TOKEN secret after OIDC is proven.

Acceptance criteria

  • A new version is published by the GitHub-hosted workflow without a long-lived npm token.
  • Provenance is present for the registry artifact.
  • Fresh registry install and semantic dashboard/CLI smoke pass.
  • The old GitHub secret is removed only after successful OIDC publication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions