Skip to content

Commit 798bc50

Browse files
fix(mcp): use node to update package.json version
npm version doesn't work in yarn workspaces due to workspace:* protocol in dependencies. Use node directly to update the version. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 3ab649e commit 798bc50

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/release-mcp.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,15 @@ jobs:
116116
117117
- name: Update package.json version
118118
run: |
119-
cd packages/mcp
120-
npm version $VERSION --no-git-tag-version
119+
node -e "
120+
const fs = require('fs');
121+
const path = 'packages/mcp/package.json';
122+
const pkg = JSON.parse(fs.readFileSync(path, 'utf8'));
123+
pkg.version = process.env.VERSION;
124+
fs.writeFileSync(path, JSON.stringify(pkg, null, 4) + '\n');
125+
"
121126
echo "Updated package.json to version $VERSION"
122-
cat package.json | head -n 5
127+
head -n 5 packages/mcp/package.json
123128
124129
- name: Configure git
125130
run: |

0 commit comments

Comments
 (0)