Skip to content

Commit 5c3c69d

Browse files
authored
Merge pull request #4 from Yoast/2-npm-trusted-publishers
Update publish.yml
2 parents d3b81a1 + d9c6661 commit 5c3c69d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ concurrency:
99
group: ${{ github.workflow }}
1010
cancel-in-progress: false
1111

12+
permissions:
13+
id-token: write # Required for OIDC to publish to NPM
14+
contents: read
15+
1216
jobs:
1317
check:
1418
name: Lint
@@ -31,7 +35,9 @@ jobs:
3135
- uses: actions/setup-node@v4
3236
with:
3337
cache: yarn
38+
registry-url: 'https://registry.npmjs.org'
3439
- run: yarn install --frozen-lockfile
35-
- run: yarn publish --verbose --access public
36-
env:
37-
YARN_AUTH_TOKEN: ${{secrets.NPM_JS_YOASTBOT_PUBLISH_ACCESS_TOKEN}}
40+
# Ensure npm 11.5.1 or later is installed - this is needed for OIDC support
41+
- name: Update npm
42+
run: npm install -g npm@latest
43+
- run: npm publish --verbose --access public

0 commit comments

Comments
 (0)