Skip to content

Commit 5caead7

Browse files
authored
Merge pull request #121 from soliktomasz/copilot/fix-create-release-job-again
Harden create-release Velopack uploads against transient GitHub transport failures
2 parents 5d9f4ec + 062faff commit 5caead7

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,12 +571,23 @@ jobs:
571571
*) echo "Unknown Velopack artifact channel for $artifact_dir"; exit 1 ;;
572572
esac
573573
574-
vpk upload github \
574+
max_attempts=3
575+
attempt=1
576+
until vpk upload github \
575577
--outputDir "$releases_dir" \
576578
--repoUrl https://github.com/${{ github.repository }} \
577579
--channel "$channel" \
578580
--token "$VPK_TOKEN" \
579581
--merge \
580582
--publish \
581-
--tag "$TAG"
583+
--tag "$TAG"; do
584+
if [ "$attempt" -ge "$max_attempts" ]; then
585+
echo "Velopack upload failed for channel '$channel' after ${max_attempts} attempts."
586+
exit 1
587+
fi
588+
sleep_seconds=$((attempt * 15))
589+
echo "Velopack upload failed for channel '$channel' (attempt ${attempt}/${max_attempts}). Retrying in ${sleep_seconds}s..."
590+
sleep "$sleep_seconds"
591+
attempt=$((attempt + 1))
592+
done
582593
done

0 commit comments

Comments
 (0)