mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
fix: add retry for release upload to handle API propagation delay
gh release upload can fail with "release not found" when called immediately after gh release create due to GitHub API propagation delay. Add a 5s sleep after create and retry the upload up to 3 times.
This commit is contained in:
parent
350a5733c3
commit
badbbf71f5
1 changed files with 6 additions and 1 deletions
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
|
|
@ -264,8 +264,13 @@ jobs:
|
||||||
if ! gh release view "$TAG" > /dev/null 2>&1; then
|
if ! gh release view "$TAG" > /dev/null 2>&1; then
|
||||||
gh release create "$TAG" --prerelease --title "$TAG" --generate-notes \
|
gh release create "$TAG" --prerelease --title "$TAG" --generate-notes \
|
||||||
--notes "**Xray-core:** ${{ steps.xray_version.outputs.version }}"
|
--notes "**Xray-core:** ${{ steps.xray_version.outputs.version }}"
|
||||||
|
sleep 5
|
||||||
fi
|
fi
|
||||||
gh release upload "$TAG" x-ui-linux-${{ matrix.platform }}.tar.gz --clobber
|
for i in 1 2 3; do
|
||||||
|
gh release upload "$TAG" x-ui-linux-${{ matrix.platform }}.tar.gz --clobber && break
|
||||||
|
echo "Upload attempt $i failed, retrying in 5s..."
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
|
||||||
# =================================
|
# =================================
|
||||||
# Windows Build (disabled)
|
# Windows Build (disabled)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue