File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 2727 - name : Get latest release info
2828 id : latest_release_info
2929 env :
30- API_URL : https://api.github.com/repos/safe-global/safe-wallet-monorepo/releases/latest
30+ API_URL : https://api.github.com/repos/safe-global/safe-wallet-monorepo/releases
3131 MAX_ATTEMPTS : 3 # # Max number of attempts to fetch the release info
3232 DELAY : 10 # # seconds
3333 run : |
3737 attempt=1
3838 while true; do
3939 echo "Attempt $attempt to fetch release info..."
40- RELEASE_INFO=$(curl -sSf "$API_URL")
41- if [ $? -eq 0 ] && echo "$RELEASE_INFO" | jq -e '.assets' > /dev/null; then
42- break
40+ RELEASES=$(curl -sSf "$API_URL")
41+ if [ $? -eq 0 ] && echo "$RELEASES" | jq -e '. | length > 0' > /dev/null; then
42+ # Filter for the latest non-draft, non-prerelease
43+ RELEASE_INFO=$(echo "$RELEASES" | jq '[.[] | select(.draft == false and .prerelease == false)][0]')
44+
45+ # Check if we found a valid release
46+ if [ "$RELEASE_INFO" != "null" ] && echo "$RELEASE_INFO" | jq -e '.assets' > /dev/null; then
47+ break
48+ fi
49+
50+ echo "No stable release found, retrying..."
4351 fi
4452
4553 if [ "$attempt" -ge "$MAX_ATTEMPTS" ]; then
You can’t perform that action at this time.
0 commit comments