Skip to content

Commit 027a6ab

Browse files
Use OIDC for publishing (#7)
1 parent bf21b98 commit 027a6ab

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
default: true
1010
type: boolean
1111

12+
permissions:
13+
contents: read
14+
id-token: write
15+
1216
jobs:
1317
publish:
1418
runs-on: ubuntu-latest
@@ -19,21 +23,17 @@ jobs:
1923
- uses: actions/checkout@v6
2024
- uses: actions/setup-node@v6
2125
with:
22-
node-version: 22
26+
node-version: 24
2327
registry-url: https://registry.npmjs.org
2428
- run: npm ci
2529

2630
- name: Publish package
27-
env:
28-
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_PUBLISH_TOKEN }}
2931
if: >
3032
(github.event_name == 'release' && github.event.action == 'published') ||
3133
(github.event_name == 'workflow_dispatch' && !inputs.dryRun)
3234
run: npm publish --provenance --access public
3335

3436
- name: Publish package (dry run)
35-
env:
36-
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_PUBLISH_TOKEN }}
3737
if: >
3838
(github.event_name == 'release' && github.event.action != 'published') ||
3939
(github.event_name == 'workflow_dispatch' && inputs.dryRun)

0 commit comments

Comments
 (0)