Skip to content

Commit 91a7d3c

Browse files
authored
chore: switch to npm staged publishing (#143)
1 parent 1ff73b4 commit 91a7d3c

2 files changed

Lines changed: 8 additions & 21 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# This action will publish the package to npm and create a GitHub release.
21
name: Release
32

43
on:
@@ -10,8 +9,8 @@ on:
109
workflow_dispatch:
1110

1211
permissions:
13-
contents: write
14-
id-token: write
12+
contents: read
13+
id-token: write # Required for OIDC
1514

1615
jobs:
1716
publish:
@@ -21,30 +20,18 @@ jobs:
2120
- name: Checkout
2221
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2322

24-
- name: Setup pnpm
25-
uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6
26-
2723
- name: Setup Node.js
2824
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
2925
with:
3026
node-version: 24.15.0
3127

32-
# Update npm to the latest version to enable OIDC
33-
# Use corepack to install pnpm
34-
- name: Update npm CLI
28+
- name: Setup Pnpm
3529
run: |
36-
npm install -g npm@latest
37-
npm --version
30+
npm install -g corepack@latest --force
31+
corepack enable
3832
3933
- name: Install Dependencies
40-
run: pnpm install
34+
run: pnpm i
4135

4236
- name: Publish
43-
uses: JS-DevTools/npm-publish@0fd2f4369c5d6bcfcde6091a7c527d810b9b5c3f # v4
44-
with:
45-
token: empty
46-
47-
- name: Create GitHub Release
48-
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1
49-
with:
50-
generateReleaseNotes: 'true'
37+
run: pnpm stage publish --no-git-checks

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"engines": {
6565
"node": "^20.19.0 || >=22.12.0"
6666
},
67-
"packageManager": "pnpm@11.2.2",
67+
"packageManager": "pnpm@11.3.0",
6868
"publishConfig": {
6969
"access": "public",
7070
"registry": "https://registry.npmjs.org/"

0 commit comments

Comments
 (0)