Skip to content

Commit 1cd9454

Browse files
ci: switch to npm trusted publishing (OIDC) for releases (#198)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d3bf67f commit 1cd9454

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
permissions:
1515
contents: write # required for changesets to push tags/commits
1616
pull-requests: write # required for changesets to create PRs
17+
id-token: write # required for npm trusted publishing (OIDC)
1718
steps:
1819
- name: Harden the runner (Audit all outbound calls)
1920
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
@@ -35,8 +36,8 @@ jobs:
3536

3637
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
3738
with:
38-
node-version: 18
39-
registry-url: https://registry.npmjs.org # important!
39+
node-version: 22
40+
registry-url: https://registry.npmjs.org
4041
cache: yarn
4142

4243
# The Changesets action will either create/update a release PR or, if no changesets remain, publish to npm.
@@ -46,4 +47,4 @@ jobs:
4647
publish: yarn changeset publish
4748
env:
4849
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
50+
NPM_CONFIG_PROVENANCE: true

0 commit comments

Comments
 (0)