Skip to content

Commit f7c46ed

Browse files
fix: Update workflow to avoid triggering prepublishOnly in dist/
The workflow was running 'npm version' in the dist/ directory, which triggered the prepublishOnly script that tried to run build.js (which doesn't exist in dist/). This fix manually updates the version in dist/package.json using a node script instead. ✅ Fixes GitHub Actions publish failure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent bf3f09f commit f7c46ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/publish-npm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ jobs:
6060
run: |
6161
cd mcp-package
6262
npm version ${{ steps.version.outputs.version }} --no-git-tag-version
63-
cd dist
64-
npm version ${{ steps.version.outputs.version }} --no-git-tag-version
63+
# Update version in dist/package.json
64+
node -e "const fs=require('fs');const p=require('./dist/package.json');p.version='${{ steps.version.outputs.version }}';fs.writeFileSync('./dist/package.json',JSON.stringify(p,null,2));"
6565
6666
- name: Publish to npm
6767
run: |

0 commit comments

Comments
 (0)