Publish to MCP Registry #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to MCP Registry | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run lint | |
| run: npm run lint | |
| - name: Run type check | |
| run: npm run type-check | |
| - name: Install MCP Publisher | |
| run: | | |
| OS=$(uname -s | tr '[:upper:]' '[:lower:]') | |
| ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') | |
| RELEASE_TAG=$(curl -s https://api.github.com/repos/modelcontextprotocol/registry/releases | \ | |
| jq -r '.[] | select(.assets | map(.name) | any(test("mcp-publisher_"))) | .tag_name' | head -1) | |
| echo "Downloading mcp-publisher ${RELEASE_TAG} for ${OS}_${ARCH}" | |
| curl -fL "https://github.com/modelcontextprotocol/registry/releases/download/${RELEASE_TAG}/mcp-publisher_${OS}_${ARCH}.tar.gz" | tar xz | |
| chmod +x mcp-publisher | |
| - name: Login to MCP Registry | |
| run: ./mcp-publisher login github-oidc | |
| - name: Publish to MCP Registry | |
| run: ./mcp-publisher publish |