Skip to content

ci: publish to npm with trusted publishing (OIDC) - #10

Closed
mvantellingen wants to merge 1 commit into
mainfrom
npm-oidc
Closed

mvantellingen wants to merge 1 commit into
mainfrom
npm-oidc

Conversation

@mvantellingen

Copy link
Copy Markdown
Member

npm trusted publishing

The org-level NPM_TOKEN secret is gone, so releases now publish through npm trusted publishing (OIDC), following labd/commercetools-node-mock.

  • release job: environment: release, with id-token: write, contents: write and pull-requests: write
  • Node 18 -> 24 in the release job: npm trusted publishing needs Node >= 22.14 and npm >= 11.5.1. npm is upgraded to ^11.6.4; pnpm 8 publishes through the npm CLI.
  • Removes the pnpm store cache from the release job (cache poisoning) and drops NPM_TOKEN / NODE_AUTH_TOKEN
  • changesets/action v1.7.0 -> v2.1.2 (inputs renamed), with push-with-git-cli: true and NPM_CONFIG_PROVENANCE: true
  • package.json: repository.url is now git+https://github.com/labd/js-toolkit.git and publishConfig.provenance is true

Before merging, add a trusted publisher on npmjs.com for @labdigital/toolkit. Use repository labd/js-toolkit, workflow release.yml and environment release.

@changeset-bot

changeset-bot Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c9f220c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mvantellingen mvantellingen changed the title Publish to npm with trusted publishing (OIDC) ci: publish to npm with trusted publishing (OIDC) Oct 25, 2026
mvantellingen added a commit that referenced this pull request Oct 26, 2026
Supersedes #10 (rebuilt on top of main). Publish through changesets/action
v2 with npm trusted publishing and provenance instead of an NPM_TOKEN,
run the release job in the release environment without a dependency
cache and set up Node/pnpm via labd/gh-actions-typescript. Also run the
validation on pull requests instead of on every push.
@mvantellingen
mvantellingen deleted the npm-oidc branch October 26, 2026 13:32
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