File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 echo "::error::Tag ${GITHUB_REF_NAME} does not match pyproject.toml version ${PKG_VERSION}"
3636 exit 1
3737 fi
38+ SERVER_VERSION=$(uv run python -c "import json; print(json.load(open('server.json'))['version'])")
39+ PACKAGE_VERSION=$(uv run python -c "import json; print(json.load(open('server.json'))['packages'][0]['version'])")
40+ if [ "$TAG_VERSION" != "$SERVER_VERSION" ]; then
41+ echo "::error::Tag ${GITHUB_REF_NAME} does not match server.json version ${SERVER_VERSION}"
42+ exit 1
43+ fi
44+ if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
45+ echo "::error::Tag ${GITHUB_REF_NAME} does not match server.json package version ${PACKAGE_VERSION}"
46+ exit 1
47+ fi
3848 echo "Version check passed: ${PKG_VERSION}"
3949
4050 - name : Run linter
@@ -97,9 +107,37 @@ jobs:
97107 - name : Publish to PyPI
98108 uses : pypa/gh-action-pypi-publish@release/v1
99109
100- github-release :
110+ publish-mcp-registry :
101111 needs : publish
102112 runs-on : ubuntu-latest
113+ name : Publish to MCP Registry
114+ timeout-minutes : 10
115+ permissions :
116+ id-token : write
117+ contents : read
118+
119+ steps :
120+ - uses : actions/checkout@v6
121+
122+ - name : Install mcp-publisher
123+ run : |
124+ curl -L "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" \
125+ | tar xz mcp-publisher
126+
127+ - name : Validate server.json
128+ run : ./mcp-publisher validate server.json
129+
130+ - name : Authenticate to MCP Registry
131+ run : ./mcp-publisher login github-oidc
132+
133+ - name : Publish to MCP Registry
134+ run : ./mcp-publisher publish
135+
136+ github-release :
137+ needs :
138+ - publish
139+ - publish-mcp-registry
140+ runs-on : ubuntu-latest
103141 name : Create GitHub Release
104142 timeout-minutes : 10
105143 permissions :
You can’t perform that action at this time.
0 commit comments