Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

ci(mcp): fail loudly on npm publish error, skip only on existing version

Louis Beaumonta1dbe1418423
diff --git a/.github/workflows/release-mcp.yml b/.github/workflows/release-mcp.yml
index dc162cada..1b79c549d 100644
--- a/.github/workflows/release-mcp.yml
+++ b/.github/workflows/release-mcp.yml
@@ -35,7 +35,13 @@ jobs:
- name: Publish to npm
working-directory: packages/screenpipe-mcp
- run: npm publish --access public || echo "npm publish failed (version may already exist) — continuing"
+ run: |
+ VER=$(node -p "require('./package.json').version")
+ if npm view "screenpipe-mcp@$VER" version >/dev/null 2>&1; then
+ echo "screenpipe-mcp@$VER already on npm — skipping publish"
+ else
+ npm publish --access public
+ fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}