Skip to content

Commit 19caedf

Browse files
committed
Add retry on MCP publish
1 parent 915b11c commit 19caedf

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,23 @@ jobs:
125125

126126
- name: Publish to MCP Registry
127127
if: github.event_name == 'push'
128-
run: ./mcp-publisher publish
128+
run: |
129+
echo "🚢 Publishing to MCP Registry with retries..."
130+
attempts=0
131+
max_attempts=5
132+
delay=5
133+
until ./mcp-publisher publish; do
134+
rc=$?
135+
attempts=$((attempts+1))
136+
if [ $attempts -ge $max_attempts ]; then
137+
echo "❌ Publish failed after $attempts attempts (exit $rc)"
138+
exit $rc
139+
fi
140+
echo "⚠️ Publish failed (exit $rc). Retrying in ${delay}s... (attempt ${attempts}/${max_attempts})"
141+
sleep $delay
142+
delay=$((delay*2))
143+
done
144+
echo "✅ Publish succeeded."
129145
130146
- name: Create GitHub Release (production releases only)
131147
if: github.event_name == 'push'

0 commit comments

Comments
 (0)