Skip to content

Commit 3c8b3f7

Browse files
committed
Set up OIDC npm trusted publishing
Closes #384
1 parent f60af8f commit 3c8b3f7

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ jobs:
1111
release:
1212
name: Release
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
id-token: write
1418
steps:
1519
- name: Checkout Repo
1620
uses: actions/checkout@v4
@@ -28,6 +32,10 @@ jobs:
2832
with:
2933
node-version: 20.x
3034
cache: 'pnpm'
35+
registry-url: 'https://registry.npmjs.org'
36+
37+
- name: Update npm to latest
38+
run: npm install -g npm@latest
3139

3240
- name: Install Dependencies
3341
run: pnpm install --frozen-lockfile
@@ -43,4 +51,3 @@ jobs:
4351
publish: pnpm ci:publish
4452
env:
4553
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"format": "prettier --write .",
1111
"format:check": "prettier --check .",
1212
"ci:version": "changeset version && pnpm install --no-frozen-lockfile",
13-
"ci:publish": "pnpm publish -r && changeset tag"
13+
"ci:publish": "pnpm publish -r --provenance && changeset tag"
1414
},
1515
"pnpm": {
1616
"onlyBuiltDependencies": [

0 commit comments

Comments
 (0)