Skip to content

Commit 45f2a48

Browse files
npm publish fix - re write publish logic (#40)
* npm publish fix - re write publish logic * version update * version update
1 parent d24dafc commit 45f2a48

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/npm-publish.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
name: Node.js Package
55

66
on:
7+
pull_request:
8+
branches: [main, master]
79
release:
810
types: [created]
911

@@ -19,11 +21,18 @@ jobs:
1921
with:
2022
node-version: 22
2123
registry-url: https://registry.npmjs.org/
22-
- run: npm ci
24+
- run: npm install
2325
- run: npm run build
24-
- run: npm publish --provenance --access public
26+
- name: Publish to npm (dry-run on PR)
27+
run: |
28+
if [ "${{ github.event_name }}" == "pull_request" ]; then
29+
npm publish --provenance --access public --dry-run
30+
else
31+
npm publish --provenance --access public
32+
fi
2533
2634
publish-gpr:
35+
if: github.event_name == 'release'
2736
runs-on: ubuntu-latest
2837
permissions:
2938
contents: read

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-spread-sheet-excel",
3-
"version": "3.2.2",
3+
"version": "3.2.4",
44
"description": "Lightning-fast React spreadsheet component with Excel-like features. Render 100,000+ cells with formulas, formatting, copy/paste, undo/redo. Perfect for data grids and Excel-like apps.",
55
"keywords": [
66
"react-spread-sheet-excel",

0 commit comments

Comments
 (0)