Skip to content

Commit baa4d0e

Browse files
committed
🔧 Build before npm publish in releases
Run the pnpm build explicitly, then publish with npm lifecycle scripts disabled so npm publish does not invoke prepublishOnly under the runner's Node 20 environment.
1 parent 8c350b7 commit baa4d0e

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/release-beta.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,8 @@ jobs:
9393
draft: false
9494
prerelease: true
9595

96+
- name: Build package
97+
run: pnpm run build
98+
9699
- name: Publish to NPM
97-
run: npm publish --provenance --access public --tag ${{ github.event.inputs.prerelease_id }}
100+
run: npm publish --provenance --access public --tag ${{ github.event.inputs.prerelease_id }} --ignore-scripts

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,11 @@ jobs:
162162
exit 1
163163
fi
164164
165+
- name: Build package
166+
run: pnpm run build
167+
165168
- name: Publish to NPM
166-
run: npm publish --provenance --access public
169+
run: npm publish --provenance --access public --ignore-scripts
167170

168171
- name: Push version and tag
169172
run: |

0 commit comments

Comments
 (0)