diff --git a/.changeset/late-mice-think.md b/.changeset/late-mice-think.md new file mode 100644 index 0000000..81e13f3 --- /dev/null +++ b/.changeset/late-mice-think.md @@ -0,0 +1,5 @@ +--- +"rehype-pretty-code": patch +--- + +chore: fix npm OIDC trusted publishing workflow diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c630614..faae504 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,7 +52,8 @@ jobs: uses: actions/setup-node@v4 with: cache: 'pnpm' - node-version: 'lts/*' + # Required for npm OIDC trusted publishing (npm >= 11.5.1), while staying on Node 24. + node-version: '^24.14.0' registry-url: 'https://registry.npmjs.org' - name: 'Install Dependencies' @@ -82,7 +83,7 @@ jobs: commit: "[ci] release" title: "[ci] release" env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Workaround for changesets/action requiring this var to be set. + # OIDC trusted publishing does not use an npm token secret. + NPM_TOKEN: ""