Skip to content

Commit 7e98168

Browse files
committed
chore: switch to trusted publishing
1 parent 1c445ab commit 7e98168

File tree

3 files changed

+602
-659
lines changed

3 files changed

+602
-659
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Publish
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
id-token: write # Required for OIDC
8+
contents: read
9+
610
jobs:
711
release:
812
if: github.ref == 'refs/heads/main'
@@ -15,21 +19,16 @@ jobs:
1519
- name: Install pnpm
1620
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
1721

18-
- name: Set node version to 22
22+
- name: Set node version to 24
1923
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
2024
with:
21-
node-version: 22.22.0
25+
node-version: 24
2226
cache: 'pnpm'
2327

2428
- name: Prepare
2529
run: pnpm install --frozen-lockfile
2630

27-
- name: Set publishing config
28-
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
29-
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
31-
3231
- name: Publish
3332
run: |
3433
PACKAGE_DIST_TAG=$(node -e "console.log(/^\d+\.\d+\.\d+(\-(\w+)\.\d+)$/.exec(require('./package.json').version)?.[2] || 'latest')")
35-
pnpm publish --access public --tag $PACKAGE_DIST_TAG
34+
pnpm publish --access public --tag $PACKAGE_DIST_TAG --provenance

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
"optional": true
132132
}
133133
},
134-
"packageManager": "pnpm@10.28.0",
134+
"packageManager": "pnpm@10.29.3",
135135
"engines": {
136136
"node": ">=20.11.0"
137137
}

0 commit comments

Comments
 (0)