@@ -153,10 +153,25 @@ jobs:
153153 preflight_dir="${RUNNER_TEMP}/openclaw-npm-preflight-manifest"
154154 rm -rf "${preflight_dir}"
155155 mkdir -p "${preflight_dir}"
156- if gh run download "${PREFLIGHT_RUN_ID}" \
157- --repo "${GITHUB_REPOSITORY}" \
158- --name "${preferred_name}" \
159- --dir "${preflight_dir}"; then
156+
157+ download_named_artifact() {
158+ local artifact_name="$1"
159+ for attempt in 1 2 3; do
160+ if gh run download "${PREFLIGHT_RUN_ID}" \
161+ --repo "${GITHUB_REPOSITORY}" \
162+ --name "${artifact_name}" \
163+ --dir "${preflight_dir}"; then
164+ return 0
165+ fi
166+ if [[ "$attempt" != "3" ]]; then
167+ echo "::warning::Artifact download for ${artifact_name} failed on attempt ${attempt}; retrying."
168+ sleep $((attempt * 10))
169+ fi
170+ done
171+ return 1
172+ }
173+
174+ if download_named_artifact "${preferred_name}"; then
160175 echo "name=${preferred_name}" >> "$GITHUB_OUTPUT"
161176 exit 0
162177 fi
@@ -172,10 +187,7 @@ jobs:
172187 exit 1
173188 fi
174189 fallback_name="${matches[0]}"
175- gh run download "${PREFLIGHT_RUN_ID}" \
176- --repo "${GITHUB_REPOSITORY}" \
177- --name "${fallback_name}" \
178- --dir "${preflight_dir}"
190+ download_named_artifact "${fallback_name}"
179191 echo "name=${fallback_name}" >> "$GITHUB_OUTPUT"
180192
181193 - name : Download full release validation manifest
0 commit comments