ci: fix MCP Registry publishing workflow (#21342)
Ilya Mashchenko committed
Nov 22, 2025 at 17:18 UTC
73d422317339b17912e08bf7b0adec53c1b81977
1 file changed
+15
.github/workflows/update-mcp-registry.yml
+15
@@ -2,6 +2,7 @@ name: Update MCP Registry
2
on:
3
release:
4
types: [released]
5
+ workflow_dispatch:
6
7
concurrency:
8
group: update-mcp-registry-${{ github.ref }}-${{ github.event_name }}
@@ -16,6 +17,14 @@ jobs:
17
name: Publish to MCP Registry
18
runs-on: ubuntu-latest
19
steps:
20
+ - name: Abort if manual run is not on a v* tag
21
+ if: >
22
+ github.event_name == 'workflow_dispatch' &&
23
+ !startsWith(github.ref, 'refs/tags/v')
24
+ run: |
25
+ echo "❌ This workflow can only be run manually on a tag starting with 'v'."
26
+ echo "Ref: ${{ github.ref }}"
27
+ exit 1
28
- name: Checkout
29
id: checkout
30
uses: actions/checkout@v6
@@ -39,6 +48,11 @@ jobs:
48
sudo mv mcp-publisher /usr/local/bin/
49
mcp-publisher --version
50
51
+ - name: Authenticate mcp-publisher
52
+ id: mcp_auth
53
+ run: |
54
+ mcp-publisher login github-oidc
55
+
56
- name: Validate server.json (dry run)
57
id: validate
58
env:
@@ -65,6 +79,7 @@ jobs:
79
Checkout: ${{ steps.checkout.outcome }}
80
Update version: ${{ steps.update_version.outcome }}
81
Install mcp-publisher: ${{ steps.install_publisher.outcome }}
82
+ MCP Auth: ${{ steps.mcp_auth.outcome }}
83
Validate: ${{ steps.validate.outcome }}
84
Publish: ${{ steps.publish.outcome }}
85
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}