Merge pull request #45 from onkernel/mason/mcp-registry-releaser #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 MCP server.json | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for OIDC authentication | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js # Adjust for your language | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install MCP Publisher | |
| run: | | |
| # Build publisher from source (requires Go) | |
| git clone https://github.com/modelcontextprotocol/registry publisher-repo | |
| cd publisher-repo | |
| make publisher | |
| cp bin/mcp-publisher ../mcp-publisher | |
| cd .. | |
| chmod +x mcp-publisher | |
| - name: Login to MCP Registry | |
| run: ./mcp-publisher login github-oidc | |
| - name: Publish to MCP Registry | |
| run: ./mcp-publisher publish |