Skip to content

Commit c5aad80

Browse files
committed
ci: update Install MCP Publisher script
1 parent 74614d2 commit c5aad80

File tree

1 file changed

+6
-28
lines changed

1 file changed

+6
-28
lines changed

.github/workflows/publish-mcp.yml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,38 +34,16 @@ jobs:
3434

3535
- name: Install MCP Publisher
3636
run: |
37-
URL="https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz"
38-
echo "Downloading MCP Publisher from: $URL"
37+
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
38+
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
3939
40-
# Download with failure handling
41-
if ! curl -fL "$URL" -o mcp-publisher.tar.gz; then
42-
echo "Failed to download MCP Publisher"
43-
exit 1
44-
fi
40+
RELEASE_TAG=$(curl -s https://api.github.com/repos/modelcontextprotocol/registry/releases | \
41+
jq -r '.[] | select(.assets | map(.name) | any(test("mcp-publisher_"))) | .tag_name' | head -1)
4542
46-
# Verify the downloaded file is a valid gzip archive
47-
if ! file mcp-publisher.tar.gz | grep -q 'gzip compressed'; then
48-
echo "Downloaded file is not a valid gzip archive"
49-
echo "File type: $(file mcp-publisher.tar.gz)"
50-
echo "File contents:"
51-
cat mcp-publisher.tar.gz
52-
exit 1
53-
fi
54-
55-
# Extract the archive
56-
tar xzf mcp-publisher.tar.gz
57-
58-
# Verify the binary was extracted successfully
59-
if [ ! -f mcp-publisher ]; then
60-
echo "mcp-publisher binary not found after extraction"
61-
exit 1
62-
fi
63-
64-
# Make it executable
43+
echo "Downloading mcp-publisher ${RELEASE_TAG} for ${OS}_${ARCH}"
44+
curl -fL "https://github.com/modelcontextprotocol/registry/releases/download/${RELEASE_TAG}/mcp-publisher_${OS}_${ARCH}.tar.gz" | tar xz
6545
chmod +x mcp-publisher
6646
67-
echo "MCP Publisher installed successfully"
68-
6947
- name: Login to MCP Registry
7048
run: ./mcp-publisher login github-oidc
7149

0 commit comments

Comments
 (0)