fix(ci): add retry to release upload steps to handle transient API failures
This commit is contained in:
parent
e4c05c7367
commit
c12a405ffb
1 changed files with 15 additions and 3 deletions
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
|
|
@ -143,8 +143,12 @@ jobs:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
TAG="${GITHUB_REF#refs/tags/}"
|
TAG="${GITHUB_REF#refs/tags/}"
|
||||||
|
upload() {
|
||||||
|
gh release upload "$TAG" "$1" --repo "$GITHUB_REPOSITORY" --clobber || \
|
||||||
|
(sleep 5 && gh release upload "$TAG" "$1" --repo "$GITHUB_REPOSITORY" --clobber)
|
||||||
|
}
|
||||||
for f in release/*.dmg release/*.zip release/*.blockmap; do
|
for f in release/*.dmg release/*.zip release/*.blockmap; do
|
||||||
[ -f "$f" ] && gh release upload "$TAG" "$f" --repo "$GITHUB_REPOSITORY" --clobber
|
[ -f "$f" ] && upload "$f"
|
||||||
done
|
done
|
||||||
|
|
||||||
release-win:
|
release-win:
|
||||||
|
|
@ -213,8 +217,12 @@ jobs:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
TAG="${GITHUB_REF#refs/tags/}"
|
TAG="${GITHUB_REF#refs/tags/}"
|
||||||
|
upload() {
|
||||||
|
gh release upload "$TAG" "$1" --repo "$GITHUB_REPOSITORY" --clobber || \
|
||||||
|
(sleep 5 && gh release upload "$TAG" "$1" --repo "$GITHUB_REPOSITORY" --clobber)
|
||||||
|
}
|
||||||
for f in release/*.exe release/*.blockmap; do
|
for f in release/*.exe release/*.blockmap; do
|
||||||
[ -f "$f" ] && gh release upload "$TAG" "$f" --repo "$GITHUB_REPOSITORY" --clobber
|
[ -f "$f" ] && upload "$f"
|
||||||
done
|
done
|
||||||
|
|
||||||
release-linux:
|
release-linux:
|
||||||
|
|
@ -285,8 +293,12 @@ jobs:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
TAG="${GITHUB_REF#refs/tags/}"
|
TAG="${GITHUB_REF#refs/tags/}"
|
||||||
|
upload() {
|
||||||
|
gh release upload "$TAG" "$1" --repo "$GITHUB_REPOSITORY" --clobber || \
|
||||||
|
(sleep 5 && gh release upload "$TAG" "$1" --repo "$GITHUB_REPOSITORY" --clobber)
|
||||||
|
}
|
||||||
for f in release/*.AppImage release/*.deb release/*.rpm release/*.pacman release/*.blockmap; do
|
for f in release/*.AppImage release/*.deb release/*.rpm release/*.pacman release/*.blockmap; do
|
||||||
[ -f "$f" ] && gh release upload "$TAG" "$f" --repo "$GITHUB_REPOSITORY" --clobber
|
[ -f "$f" ] && upload "$f"
|
||||||
done
|
done
|
||||||
|
|
||||||
upload-stable-links:
|
upload-stable-links:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue