Skip to content

Commit 2c489fe

Browse files
authored
ci: migrate npm publish to OIDC (#269)
1 parent 9b53bd1 commit 2c489fe

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.changeset/late-mice-think.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"rehype-pretty-code": patch
3+
---
4+
5+
chore: fix npm OIDC trusted publishing workflow

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ jobs:
5252
uses: actions/setup-node@v4
5353
with:
5454
cache: 'pnpm'
55-
node-version: 'lts/*'
55+
# Required for npm OIDC trusted publishing (npm >= 11.5.1), while staying on Node 24.
56+
node-version: '^24.14.0'
5657
registry-url: 'https://registry.npmjs.org'
5758

5859
- name: 'Install Dependencies'
@@ -82,7 +83,7 @@ jobs:
8283
commit: "[ci] release"
8384
title: "[ci] release"
8485
env:
85-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
8686
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
88-
NPM_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
# Workaround for changesets/action requiring this var to be set.
88+
# OIDC trusted publishing does not use an npm token secret.
89+
NPM_TOKEN: ""

0 commit comments

Comments
 (0)