Skip to content

Commit 948c4fa

Browse files
authored
Merge pull request #1199 from modelcontextprotocol/paulc/npm-trusted-publishing
ci: switch npm publish to OIDC trusted publishing
2 parents 996f02c + 68d45fc commit 948c4fa

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,13 @@ jobs:
6161
# - run: npm ci
6262
- run: npm install --no-package-lock
6363

64-
# TODO: Add --provenance once the repo is public
64+
# OIDC trusted publishing requires npm >=11.5.1; Node 22's bundled npm is 10.x.
65+
- name: Ensure npm CLI supports OIDC trusted publishing
66+
run: npm install -g npm@^11.5.1
67+
6568
- run: npm run publish-all
6669
env:
67-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
70+
NPM_CONFIG_PROVENANCE: "true"
6871

6972
publish-github-container-registry:
7073
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)