ci(telegram-publish): use --clobber to survive partial-download retries

The v1.9.2 telegram publish failed because attempt 1 hit a transient
HTTP 500 from GitHub's release-asset CDN mid-download, leaving partial
files in assets/. Attempts 2 and 3 then errored on "already exists"
because gh release download refuses to overwrite without --clobber.

With --clobber, retries can complete cleanly even when an earlier
attempt left files behind. No change to the success path.
This commit is contained in:
therealaleph
2026-04-30 19:55:36 +03:00
parent d162a47e3c
commit c98ae73c92
@@ -82,9 +82,17 @@ jobs:
# Mirror the retry pattern from `release.yml`'s download step — # Mirror the retry pattern from `release.yml`'s download step —
# GitHub's release-asset CDN occasionally times out on cold # GitHub's release-asset CDN occasionally times out on cold
# tags. Three attempts with 30 s backoff covers most flakes. # tags. Three attempts with 30 s backoff covers most flakes.
#
# `--clobber` overwrites any partial files left behind by a
# previous failed attempt — without it, attempt 2/3 would error
# with "already exists" the moment any single asset finished
# downloading on attempt 1 before the CDN timed out (the v1.9.2
# publish hit exactly this — HTTP 500 mid-download, then attempts
# 2/3 failed on "already exists" for the assets that did finish).
for attempt in 1 2 3; do for attempt in 1 2 3; do
if gh release download "v${{ steps.ver.outputs.version }}" \ if gh release download "v${{ steps.ver.outputs.version }}" \
--dir assets \ --dir assets \
--clobber \
--repo "${GITHUB_REPOSITORY}"; then --repo "${GITHUB_REPOSITORY}"; then
echo "downloaded release assets on attempt $attempt" echo "downloaded release assets on attempt $attempt"
ls -la assets/ ls -la assets/