Skip to content

Commit 947d6e6

Browse files
authored
infra: update NPM publish to use trusted publishing (#203)
1 parent 3f361b7 commit 947d6e6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/release.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ on:
55
jobs:
66
ReleaseNPM:
77
runs-on: ubuntu-latest
8+
environment:
9+
name: npmjs
10+
permissions:
11+
id-token: write
12+
contents: read
813
steps:
914
- name: Repo checkout
1015
uses: actions/checkout@v6
1116
- name: Set release version to package.json
1217
run: jq --indent 4 '.version = "${{ github.ref_name }}"' < package.json > package.json~ && mv package.json~ package.json
13-
- name: NPM auth
14-
run: npm set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
15-
env:
16-
NODE_AUTH_TOKEN: "${{ secrets.NPMJS_SECRET }}"
1718
- name: NPM release
1819
run: npm publish
1920
ReleasePyPI:

0 commit comments

Comments
 (0)