Skip to content

Commit 51f12d6

Browse files
committed
security: replace release token with npm OIDC
1 parent ce57377 commit 51f12d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ concurrency:
77
group: ${{ github.workflow }}
88
cancel-in-progress: false
99

10+
permissions:
11+
id-token: write # Required for NPM OIDC
12+
1013
jobs:
1114
should-release:
1215
runs-on: ubuntu-latest
@@ -32,7 +35,6 @@ jobs:
3235
env:
3336
CI: true
3437
GITHUB_TOKEN: ${{ secrets.ACTION_GITHUB_TOKEN }}
35-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3638
RUST_LOG: debug
3739
runs-on: ubuntu-latest
3840
steps:
@@ -63,6 +65,6 @@ jobs:
6365
- name: Stage cargo changes
6466
run: git stage Cargo.toml Cargo.lock
6567
- name: Registry auth
66-
run: pnpm set "//registry.npmjs.org/:_authToken" ${{ env.NPM_TOKEN }}
68+
run: pnpm config set registry="https://registry.npmjs.org"
6769
- name: Perform release
6870
run: pnpm run release --ci ${{ needs.should-release.outputs.version }}

0 commit comments

Comments
 (0)