Skip to content

Commit ba61b37

Browse files
committed
fix: add prepublishOnly hook in package.json
1 parent 7430bf2 commit ba61b37

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.changeset/three-suits-crash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-base-virtual-list": patch
3+
---
4+
5+
fix: add prepublishOnly hook in package.json

.github/workflows/publish.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,17 @@ jobs:
2323
- uses: pnpm/action-setup@v3
2424
- uses: actions/setup-node@v4
2525
with:
26-
node-version: 20
26+
node-version: 24
2727
cache: "pnpm"
2828
registry-url: "https://registry.npmjs.org"
2929
- run: pnpm install --frozen-lockfile
3030
- name: Create Release PR or Publish
3131
id: changesets
3232
uses: changesets/action@v1
3333
with:
34-
publish: pnpm changeset publish --provenance
34+
publish: pnpm changeset publish
3535
env:
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for write repo
3837

3938
# 任务 2:部署文档到 GitHub Pages
4039
deploy-docs:
@@ -49,7 +48,7 @@ jobs:
4948
- uses: pnpm/action-setup@v3
5049
- uses: actions/setup-node@v4
5150
with:
52-
node-version: 20
51+
node-version: 24
5352
cache: "pnpm"
5453

5554
- run: pnpm install --frozen-lockfile

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
3434
"preview": "vite preview",
3535
"change": "changeset",
36-
"version-packages": "changeset version",
37-
"release": "changeset publish"
36+
"version": "changeset version",
37+
"publish": "changeset publish",
38+
"prepublishOnly": "pnpm run build"
3839
},
3940
"peerDependencies": {
4041
"react": "^18 || ^19",

0 commit comments

Comments
 (0)