@@ -16,33 +16,48 @@ jobs:
1616 - name : Checkout code
1717 uses : actions/checkout@v5
1818
19+ - name : Setup Go
20+ uses : actions/setup-go@v5
21+ with :
22+ go-version : " stable"
23+
1924 - name : Fetch tags
20- run : git fetch --tags
25+ run : |
26+ if [[ "${{ github.ref_type }}" != "tag" ]]; then
27+ git fetch --tags
28+ else
29+ echo "Skipping tag fetch - already on tag ${{ github.ref_name }}"
30+ fi
2131
2232 - name : Install MCP Publisher
2333 run : |
24- curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.0.0/mcp-publisher_1.0.0_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
34+ git clone --quiet https://github.com/modelcontextprotocol/registry publisher-repo
35+ cd publisher-repo && make publisher > /dev/null && cd ..
36+ cp publisher-repo/bin/mcp-publisher . && chmod +x mcp-publisher
2537
2638 - name : Update server.json version
2739 run : |
2840 if [[ "${{ github.ref_type }}" == "tag" ]]; then
29- # Use the tag that triggered the workflow
3041 TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
31- echo "Using triggered tag: ${{ github.ref_name }}"
3242 else
33- # Fallback to latest tag (for manual triggers)
3443 LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$' | head -n 1)
35- if [ -z "$LATEST_TAG" ]; then
36- echo "❌ No release tag found. Cannot determine version."
37- exit 1
38- fi
44+ [ -z "$LATEST_TAG" ] && { echo "No release tag found"; exit 1; }
3945 TAG_VERSION=$(echo "$LATEST_TAG" | sed 's/^v//')
4046 echo "Using latest tag: $LATEST_TAG"
4147 fi
4248 sed -i "s/\${VERSION}/$TAG_VERSION/g" server.json
43- echo "Updated server.json version to $TAG_VERSION"
49+ echo "Version: $TAG_VERSION"
50+
51+ - name : Validate configuration
52+ run : |
53+ python3 -m json.tool server.json > /dev/null && echo "Configuration valid" || exit 1
54+
55+ - name : Display final server.json
56+ run : |
57+ echo "Final server.json contents:"
58+ cat server.json
4459
45- - name : Login to MCP Registry
60+ - name : Login to MCP Registry (OIDC)
4661 run : ./mcp-publisher login github-oidc
4762
4863 - name : Publish to MCP Registry
0 commit comments