Skip to content

Commit 834e477

Browse files
authored
Update release workflow to support trusted publishing (#1731)
1 parent 4fbbdfc commit 834e477

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/release.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88

99
concurrency: ${{ github.workflow }}-${{ github.ref }}
1010

11+
permissions:
12+
id-token: write # Required for OIDC
13+
contents: write # Required to create GH releases
14+
pull-requests: write # Required to interact with PRs
15+
1116
jobs:
1217
release:
1318
name: Release
@@ -16,10 +21,10 @@ jobs:
1621
- name: Checkout Repo
1722
uses: actions/checkout@v4
1823
- uses: pnpm/action-setup@v4
19-
- name: Use Node.js 20
24+
- name: Use Node.js 24
2025
uses: actions/setup-node@v4
2126
with:
22-
node-version: 20
27+
node-version: 24 # NPM v11.5.1 or later is required for OIDC, which ships with node v24
2328
cache: 'pnpm'
2429
- name: Install dependencies
2530
run: pnpm install
@@ -28,9 +33,6 @@ jobs:
2833
uses: changesets/action@v1
2934
with:
3035
publish: pnpm ci:publish
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3436
- name: Build Docs
3537
if: steps.changesets.outputs.published == 'true'
3638
run: pnpm build-docs

0 commit comments

Comments
 (0)