Skip to content

Commit 36c2a2b

Browse files
committed
chore: use npm trusted publishers (OIDC) instead of NPM_TOKEN
1 parent d2722db commit 36c2a2b

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

.github/workflows/release-mcp.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ on:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
contents: read
1114
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
1417
with:
1518
node-version: 'lts/*'
1619
cache: 'npm'
1720
registry-url: 'https://registry.npmjs.org'
1821
- run: npm ci
1922
- run: npm run build
2023
working-directory: ./packages/jsondiffpatch
21-
- run: npm publish
24+
- run: npm publish --provenance --access public
2225
working-directory: ./packages/diff-mcp
23-
env:
24-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ on:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
contents: read
1114
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
1417
with:
1518
node-version: 'lts/*'
1619
cache: 'npm'
1720
registry-url: 'https://registry.npmjs.org'
1821
- run: npm ci
19-
- run: npm publish
22+
- run: npm publish --provenance --access public
2023
working-directory: ./packages/jsondiffpatch
21-
env:
22-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)