Skip to content

Commit 2edea03

Browse files
authored
Try enabling trusted publisher auth (#120)
1 parent 8e09994 commit 2edea03

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ jobs:
117117
publish-npm:
118118
needs: release
119119
runs-on: ubuntu-latest
120+
permissions:
121+
id-token: write # Required for OIDC trusted publishing
122+
contents: read
120123

121124
steps:
122125
- name: Checkout code
@@ -128,6 +131,11 @@ jobs:
128131
node-version: "20"
129132
registry-url: "https://registry.npmjs.org"
130133

134+
- name: Upgrade npm
135+
# Trusted publishing (OIDC) requires npm >= 11.5.1, newer than the
136+
# version bundled with Node 20.
137+
run: npm install -g npm@latest
138+
131139
- name: Get version from tag
132140
id: version
133141
env:
@@ -145,8 +153,6 @@ jobs:
145153
- name: Publish to npm
146154
working-directory: npm
147155
run: npm publish --access public
148-
env:
149-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
150156

151157
publish-homebrew:
152158
needs: release

0 commit comments

Comments
 (0)