From 7f01dd22d63632c1768c79467594fb24e1430eac Mon Sep 17 00:00:00 2001 From: iliya Date: Tue, 31 Mar 2026 12:22:50 +0300 Subject: [PATCH] fix(ci): add verbose logging and non-fatal upload errors in release workflow --- .github/workflows/release.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31f5d373..7f370a6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -143,12 +143,12 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | 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 - [ -f "$f" ] && upload "$f" + [ -f "$f" ] || continue + echo "Uploading: $f" + gh release upload "$TAG" "$f" --repo "$GITHUB_REPOSITORY" --clobber 2>&1 || \ + (sleep 5 && gh release upload "$TAG" "$f" --repo "$GITHUB_REPOSITORY" --clobber 2>&1) || \ + echo "WARNING: failed to upload $f, continuing..." done release-win: @@ -217,12 +217,12 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | 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 - [ -f "$f" ] && upload "$f" + [ -f "$f" ] || continue + echo "Uploading: $f" + gh release upload "$TAG" "$f" --repo "$GITHUB_REPOSITORY" --clobber 2>&1 || \ + (sleep 5 && gh release upload "$TAG" "$f" --repo "$GITHUB_REPOSITORY" --clobber 2>&1) || \ + echo "WARNING: failed to upload $f, continuing..." done release-linux: @@ -292,13 +292,15 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + set -x 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) - } + ls -la release/ || true for f in release/*.AppImage release/*.deb release/*.rpm release/*.pacman release/*.blockmap; do - [ -f "$f" ] && upload "$f" + [ -f "$f" ] || continue + echo "Uploading: $f" + gh release upload "$TAG" "$f" --repo "$GITHUB_REPOSITORY" --clobber 2>&1 || \ + (sleep 5 && gh release upload "$TAG" "$f" --repo "$GITHUB_REPOSITORY" --clobber 2>&1) || \ + echo "WARNING: failed to upload $f, continuing..." done upload-stable-links: