Skip to content

Commit 11eaff2

Browse files
committed
ci: polish MCP registry job\n\n- Disable setup-go cache to remove go.sum warning\n- Add retries to DNS login\n- Track MCP_STATUS and print summary\n- Keep best-effort behavior without failing workflow
1 parent bf96962 commit 11eaff2

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ jobs:
177177
uses: actions/setup-go@v5
178178
with:
179179
go-version: '1.22'
180+
cache: false # avoid warning about missing go.sum
180181

181182
- name: Install MCP Publisher
182183
if: env.MCP_DNS_PRIVATE_KEY != ''
@@ -193,7 +194,20 @@ jobs:
193194
if: env.MCP_DNS_PRIVATE_KEY != ''
194195
run: |
195196
echo "🔐 Using DNS authentication for com.xcodebuildmcp/* namespace"
196-
./mcp-publisher login dns --domain xcodebuildmcp.com --private-key "${MCP_DNS_PRIVATE_KEY}"
197+
attempts=0
198+
max_attempts=5
199+
delay=5
200+
until ./mcp-publisher login dns --domain xcodebuildmcp.com --private-key "${MCP_DNS_PRIVATE_KEY}"; do
201+
rc=$?
202+
attempts=$((attempts+1))
203+
if [ $attempts -ge $max_attempts ]; then
204+
echo "::warning::MCP Registry login failed after $attempts attempts (exit $rc). Proceeding to publish attempt which will also retry."
205+
break
206+
fi
207+
echo "⚠️ Login failed (exit $rc). Retrying in ${delay}s... (attempt ${attempts}/${max_attempts})"
208+
sleep $delay
209+
delay=$((delay*2))
210+
done
197211
198212
- name: Publish to MCP Registry (best-effort)
199213
if: env.MCP_DNS_PRIVATE_KEY != ''
@@ -207,10 +221,35 @@ jobs:
207221
attempts=$((attempts+1))
208222
if [ $attempts -ge $max_attempts ]; then
209223
echo "⚠️ MCP Registry publish failed after $attempts attempts (exit $rc). Skipping without failing workflow."
224+
echo "MCP_STATUS=FAILED" >> $GITHUB_ENV
210225
exit 0
211226
fi
212227
echo "⚠️ Publish failed (exit $rc). Retrying in ${delay}s... (attempt ${attempts}/${max_attempts})"
213228
sleep $delay
214229
delay=$((delay*2))
215230
done
216231
echo "✅ MCP Registry publish succeeded."
232+
echo "MCP_STATUS=SUCCESS" >> $GITHUB_ENV
233+
234+
- name: Mark MCP publish skipped
235+
if: env.MCP_DNS_PRIVATE_KEY == ''
236+
run: |
237+
echo "MCP_STATUS=SKIPPED" >> $GITHUB_ENV
238+
239+
- name: MCP Publish Summary
240+
if: always()
241+
run: |
242+
case "${MCP_STATUS}" in
243+
SUCCESS)
244+
echo "✅ MCP Registry publish completed successfully."
245+
;;
246+
SKIPPED)
247+
echo "⚠️ MCP Registry publish skipped (missing MCP_DNS_PRIVATE_KEY)."
248+
;;
249+
FAILED)
250+
echo "::warning::MCP Registry publish failed after retries (best-effort). Release remains successful."
251+
;;
252+
*)
253+
echo "ℹ️ MCP Registry publish status unknown."
254+
;;
255+
esac

0 commit comments

Comments
 (0)