mirror of
https://github.com/sveltejs/ai-tools.git
synced 2026-09-14 13:50:38 +08:00
42 lines
1.4 KiB
YAML
42 lines
1.4 KiB
YAML
name: Publish to MCP Registry
|
|
|
|
on:
|
|
workflow_call:
|
|
secrets:
|
|
MCP_KEY:
|
|
required: true
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish-mcp:
|
|
name: Publish to MCP Registry
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Publish to MCP Registry
|
|
working-directory: packages/mcp-stdio
|
|
env:
|
|
MCP_KEY: ${{ secrets.MCP_KEY }}
|
|
run: |
|
|
NAME=mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz
|
|
# Download MCP Publisher pinned to v1.4.0 using latest https for security and save it to a file named mcp-publisher.tar.gz
|
|
curl --proto '=https' --proto-redir '=https' --tlsv1.2 -fL "https://github.com/modelcontextprotocol/registry/releases/download/v1.4.0/$NAME" -O
|
|
|
|
# Verify the SHA256 checksum of the downloaded file
|
|
sha256sum --ignore-missing -c ./checksums/registry_1.4.0_checksums.txt
|
|
|
|
# Extract the tarball
|
|
mkdir tmp
|
|
tar -xzf $NAME --no-same-owner --no-same-permissions -C tmp
|
|
|
|
# Install the MCP Publisher binary
|
|
install -m 0755 tmp/mcp-publisher .
|
|
|
|
# Login using DNS
|
|
./mcp-publisher login dns --domain svelte.dev --private-key "${MCP_KEY}"
|
|
|
|
# Publish to MCP Registry
|
|
./mcp-publisher publish
|