Skip to content

Commit 7c91266

Browse files
authored
Setup trusted NPMJS publishers (#2761)
1 parent b070e7c commit 7c91266

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
tags:
66
- v[0-9]+.[0-9]+.[0-9]+
77

8+
# Getting an ID token is required for NPMJS trusted publishers
9+
permissions:
10+
id-token: write # Required for OIDC
11+
contents: read
12+
813
env:
914
CI: true
1015
jobs:
@@ -18,8 +23,7 @@ jobs:
1823
node-version-file: ".nvmrc"
1924
registry-url: "https://registry.npmjs.org"
2025
cache: "npm"
21-
26+
# Ensure npm 11.5.1 or later for trusted publishing
27+
- run: npm install -g npm@latest
2228
- run: npm ci
23-
- run: npm publish --access public
24-
env:
25-
NODE_AUTH_TOKEN: ${{ secrets.INRUPT_NPM_TOKEN }}
29+
- run: npm publish

0 commit comments

Comments
 (0)