Skip to content

Commit 212adef

Browse files
authored
ci: add support for NPM OIDC trusted publishing in release workflow
1 parent 1ad066a commit 212adef

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
contents: write # for release publishing
1414
pull-requests: write # for creating PRs
1515
issues: write # additional permission that might be needed
16+
id-token: write # for NPM OIDC trusted publishing
1617

1718
name: Release
1819
env:
@@ -30,12 +31,13 @@ jobs:
3031
cache: 'yarn'
3132
- name: Install dependencies
3233
run: yarn install --frozen-lockfile --non-interactive
34+
- name: Update npm for OIDC trusted publishing
35+
run: npm install -g npm@latest
3336
- run: yarn build
3437
- name: Release
3538
id: semantic_release
3639
env:
3740
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3941
run: npx semantic-release
4042
- name: Create PR with release changes
4143
if: ${{ success() && steps.semantic_release.outcome == 'success' }}

0 commit comments

Comments
 (0)