From e40dbf63cf0c54debd1a646f1c20b446f83ba0d4 Mon Sep 17 00:00:00 2001 From: Devid HW Date: Wed, 22 Apr 2026 05:28:01 +0700 Subject: [PATCH] ci: fix mcp-publisher download with error handling - Add curl -fsSL to fail on HTTP errors - Add graceful skip if download fails - Add manual publish instructions as fallback --- .github/workflows/release.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index afd5eb7..9621468 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -169,12 +169,27 @@ jobs: - name: Install mcp-publisher run: | - curl -L -o mcp-publisher https://github.com/modelcontextprotocol/mcp-publisher/releases/latest/download/mcp-publisher-linux-amd64 + # Download mcp-publisher with error handling + curl -fsSL -o mcp-publisher https://github.com/modelcontextprotocol/mcp-publisher/releases/latest/download/mcp-publisher-linux-amd64 || { + echo "⚠️ Failed to download mcp-publisher - MCP publish will be skipped" + echo "Install manually: https://github.com/modelcontextprotocol/mcp-publisher" + exit 0 + } chmod +x mcp-publisher sudo mv mcp-publisher /usr/local/bin/ - name: Publish to MCP Registry run: | + # Check if mcp-publisher is available + if ! command -v mcp-publisher &> /dev/null; then + echo "⚠️ mcp-publisher not found - skipping MCP publish" + echo "To publish manually:" + echo " 1. Install mcp-publisher: https://github.com/modelcontextprotocol/mcp-publisher" + echo " 2. Run: mcp-publisher login github" + echo " 3. Run: mcp-publisher publish" + exit 0 + fi + echo "=== MCP Registry Publish ===" # Login with pre-authenticated token echo "${{ secrets.MCP_PUBLISH_TOKEN }}" | mcp-publisher login github --token-stdin