Skip to content

Commit 9860a2d

Browse files
committed
Enable trusted publishing for npm release
1 parent 041ca35 commit 9860a2d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77
types: [ closed ]
88

9+
permissions:
10+
id-token: write # Required for OIDC. See https://docs.npmjs.com/trusted-publishers#step-2-configure-your-cicd-workflow
11+
contents: read
912

1013
jobs:
1114
changelog:
@@ -22,6 +25,11 @@ jobs:
2225
with:
2326
token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
2427

28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: '24'
31+
registry-url: 'https://registry.npmjs.org'
32+
2533
- name: Configure Git author
2634
run: |
2735
git config --global user.name "Open Terms Archive Release Bot"
@@ -59,10 +67,11 @@ jobs:
5967
body: ${{ steps.release-changelog.outputs.content }}
6068
token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
6169

70+
- name: Update npm
71+
run: npm install -g npm@latest
72+
6273
- name: Publish to NPM public repository
63-
uses: JS-DevTools/npm-publish@v1
64-
with:
65-
token: ${{ secrets.NPMJS_ACCESS_TOKEN }}
74+
run: npm publish
6675

6776
- name: Trigger documentation deploy
6877
uses: peter-evans/repository-dispatch@v2

0 commit comments

Comments
 (0)