From db9dcb4c3b2da39dd706f9740590b38d33bcfbc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rg=20Weller?= Date: Tue, 17 Nov 2026 15:25:33 +0100 Subject: [PATCH] fix: Publish to npm via trusted publishing npm revoked the classic token behind NPM_TOKEN, so releases since 1.1.0 never reached npm. Publish with GitHub OIDC (id-token: write) on Node 24, which ships an npm with trusted publishing support. --- .github/workflows/release-please.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 4ef17cd..e3437d8 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -3,6 +3,10 @@ on: push: branches: - master +permissions: + contents: write + pull-requests: write + id-token: write # npm trusted publishing (OIDC), no NPM_TOKEN needed jobs: release-please: runs-on: ubuntu-latest @@ -12,16 +16,15 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} release-type: node - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 if: ${{ steps.release.outputs.release_created }} - - uses: actions/setup-node@v1 + # npm >= 11.5.1 is required for trusted publishing; Node 24 ships it + - uses: actions/setup-node@v4 with: - node-version: 12 + node-version: 24 registry-url: "https://registry.npmjs.org" if: ${{ steps.release.outputs.release_created }} - run: npm ci if: ${{ steps.release.outputs.release_created }} - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} if: ${{ steps.release.outputs.release_created }}