Skip to content

Publish to MCP Registry #9

Publish to MCP Registry

Publish to MCP Registry #9

Workflow file for this run

name: Publish to MCP Registry
on:
workflow_run:
workflows: ["Release"]
types: [completed]
workflow_dispatch: # Allow manual trigger
jobs:
publish:
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
- name: Download MCP Publisher
run: |
# Get the latest release tag dynamically
LATEST_TAG=$(curl -s https://api.github.com/repos/modelcontextprotocol/registry/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
echo "Downloading MCP Publisher version: $LATEST_TAG"
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/${LATEST_TAG}/mcp-publisher_linux_amd64.tar.gz" | tar xz mcp-publisher
- name: Login with GitHub OIDC
run: ./mcp-publisher login github-oidc
- name: Publish to MCP Registry
run: ./mcp-publisher publish