Skip to content

Commit 005025e

Browse files
committed
fix: use OIDC trusted publishers for npm publish workflow
Made-with: Cursor
1 parent d745415 commit 005025e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,30 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
contents: read
9+
id-token: write
10+
711
jobs:
812
publish:
913
runs-on: ubuntu-latest
10-
permissions:
11-
contents: read
12-
id-token: write
14+
1315
steps:
1416
- uses: actions/checkout@v4
17+
1518
- uses: actions/setup-node@v4
1619
with:
1720
node-version: 22
1821
registry-url: https://registry.npmjs.org
1922
cache: npm
2023
cache-dependency-path: mcp-server/package-lock.json
24+
25+
- run: npm install -g npm@latest
2126
- run: npm ci
2227
working-directory: mcp-server
2328
- run: npm run build
2429
working-directory: mcp-server
2530
- run: npm test
2631
working-directory: mcp-server
27-
- run: npm publish --access public --provenance
32+
- run: npm publish --provenance --access public
2833
working-directory: mcp-server
29-
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)