Skip to content

Commit c71ab2b

Browse files
committed
Use OIDC for publishing to NPM registry
1 parent 9c9fdd6 commit c71ab2b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Build
22
on: [push, pull_request]
33

4+
permissions:
5+
contents: write
6+
packages: write
7+
attestations: write
8+
id-token: write
9+
410
jobs:
511
build:
612
runs-on: ubuntu-latest
@@ -59,12 +65,11 @@ jobs:
5965
if: github.ref_type == 'tag'
6066
uses: actions/setup-node@v6
6167
with:
68+
node-version: '24'
6269
registry-url: https://registry.npmjs.org
6370
- name: Publish packages (npmjs.com)
6471
if: github.ref_type == 'tag'
6572
run: npm publish --access public
66-
env:
67-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
6873

6974
# Publish
7075
- name: Connect to registry (GitHub)

0 commit comments

Comments
 (0)