Skip to content

Commit efcd0c2

Browse files
committed
ci: publish to npm with provenance, ignore lifecycle scripts and drop persisted credentials
1 parent 53d1896 commit efcd0c2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/workflows/publish-npm.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@ permissions:
77
jobs:
88
publish:
99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write # npm provenance attestation; also enables npm trusted publishing (OIDC)
1013
steps:
1114
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
15+
with:
16+
persist-credentials: false
1217
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
1318
with:
1419
node-version: 24
1520
registry-url: https://registry.npmjs.org
1621
- run: node scripts/check.mjs
17-
- run: npm publish --access public
22+
- run: npm publish --access public --ignore-scripts --provenance
1823
env:
1924
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)