From e6984629fd3637a94bc486efcdfdfcd99c2dc016 Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Sun, 8 Mar 2026 01:07:32 +0300 Subject: [PATCH] Fix MCP publish: pre-build then publish with --ignore-scripts --- .github/workflows/build.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db6a6b47e..c6783970b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -163,6 +163,15 @@ jobs: } " + - name: Build packages for publish + run: | + for dir in packages/core packages/mcp; do + if [ -f "$dir/package.json" ] && node -p "require('./$dir/package.json').scripts?.build" 2>/dev/null | grep -qv undefined; then + echo "Building $dir..." + cd "$dir" && bun run build && cd - + fi + done + - name: Publish packages to npm env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -174,7 +183,7 @@ jobs: if npm view "${name}@${version}" version 2>/dev/null; then echo "${name}@${version} already published, skipping" else - npm publish "./$dir" --access public --provenance + npm publish "./$dir" --access public --provenance --ignore-scripts fi } publish_if_new packages/core