Skip to content

Commit e472dfc

Browse files
rfgamaralclaude
andcommitted
ci: Enable trusted publishing and npm provenance
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent db2a455 commit e472dfc

File tree

3 files changed

+99
-210
lines changed

3 files changed

+99
-210
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
- 'v*'
77
workflow_dispatch:
88

9+
permissions:
10+
# Enable reading repository contents (allows checkout without token)
11+
contents: read
12+
# Enable the use of OIDC for trusted publishing and npm provenance
13+
id-token: write
14+
915
jobs:
1016
publish:
1117
runs-on: ubuntu-latest
@@ -21,10 +27,11 @@ jobs:
2127
scope: '@doist'
2228
registry-url: 'https://registry.npmjs.org/'
2329

30+
- name: Ensure npm 11.5.1 or later is installed
31+
run: npm install -g npm@latest
32+
2433
- name: Install dependencies
2534
run: npm ci
2635

2736
- name: Publish package
28-
run: npm publish
29-
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
37+
run: npm publish --provenance --access public

0 commit comments

Comments
 (0)