Skip to content

Commit c91c6fa

Browse files
authored
Merge pull request #2681 from srod/develop
chore: setup npm trusted publishing with OIDC and provenance
2 parents d1a19b1 + f88f205 commit c91c6fa

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
workflow_dispatch:
88

99
permissions:
10+
id-token: write
1011
contents: write
1112
pull-requests: write
1213

@@ -26,6 +27,15 @@ jobs:
2627
- name: 📦 Setup Bun
2728
uses: oven-sh/setup-bun@v2
2829

30+
- name: ⚙️ Setup Node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: '22'
34+
registry-url: 'https://registry.npmjs.org'
35+
36+
- name: 🔧 Upgrade npm for OIDC support
37+
run: npm install -g npm@latest
38+
2939
- name: 📥 Install dependencies
3040
run: bun install --frozen-lockfile
3141

@@ -38,4 +48,3 @@ jobs:
3848
createGithubReleases: true
3949
env:
4050
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"test:coverage": "vitest run --coverage",
3737
"changeset": "changeset",
3838
"changeset:version": "changeset version && bun install --no-frozen-lockfile",
39-
"changeset:release": "bun run build && changeset publish",
39+
"changeset:release": "bun run build && changeset publish --provenance",
4040
"format:check": "bun run --filter '*' format:check",
4141
"format": "biome check --write .",
4242
"typecheck": "bun run --filter '*' typecheck"

0 commit comments

Comments
 (0)