4444: " ${RELEASE_PUSH_TAG:= ${RELEASE_DEFAULT} } "
4545: " ${RELEASE_SIGN:= ${RELEASE_DEFAULT} } "
4646: " ${RELEASE_UPLOAD:= ${RELEASE_DEFAULT} } "
47- : " ${RELEASE_WATCH:= ${RELEASE_DEFAULT} } "
4847: " ${RELEASE_WATCH_INTERVAL:= 30} "
4948
5049cd " ${SOURCE_TOP_DIR} "
@@ -83,6 +82,9 @@ if [ "${RELEASE_SIGN}" -gt 0 ]; then
8382 repository=" ${repository% .git} "
8483
8584 echo " Looking for GitHub Actions workflow on ${repository} :${rc_tag} "
85+ # If this script is interrupted or times out after the RC tag is pushed,
86+ # resume from the existing GitHub Actions run without creating the tag again:
87+ # RELEASE_PULL=0 RELEASE_PUSH_TAG=0 RELEASE_RUN_ID=<run_id> ./dev/release/release_rc.sh <version> <rc>
8688 run_id=" ${RELEASE_RUN_ID:- } "
8789 while [ -z " ${run_id} " ]; do
8890 echo " Waiting for run to start..."
@@ -95,33 +97,29 @@ if [ "${RELEASE_SIGN}" -gt 0 ]; then
9597 done
9698
9799 echo " Found GitHub Actions workflow with ID: ${run_id} "
98- if [ " ${RELEASE_WATCH} " -gt 0 ]; then
99- gh run watch --repo " ${repository} " --exit-status " ${run_id} "
100- else
101- while true ; do
102- run_status=$( gh run view \
103- --repo " ${repository} " \
104- --json ' status,conclusion' \
105- --jq ' .status + " " + (.conclusion // "")' \
106- " ${run_id} " )
107- echo " $( date -u ' +%Y-%m-%dT%H:%M:%SZ' ) GitHub Actions workflow status: ${run_status} "
108- gh run view \
109- --repo " ${repository} " \
110- --json jobs \
111- --jq ' .jobs[] | " " + .name + ": " + .status + " " + (.conclusion // "")' \
112- " ${run_id} "
113- case " ${run_status} " in
114- " completed success" )
115- break
116- ;;
117- completed\ * )
118- echo " GitHub Actions workflow did not complete successfully: ${run_status} "
119- exit 1
120- ;;
121- esac
122- sleep " ${RELEASE_WATCH_INTERVAL} "
123- done
124- fi
100+ while true ; do
101+ run_status=$( gh run view \
102+ --repo " ${repository} " \
103+ --json ' status,conclusion' \
104+ --jq ' .status + " " + (.conclusion // "")' \
105+ " ${run_id} " )
106+ echo " $( date -u ' +%Y-%m-%dT%H:%M:%SZ' ) GitHub Actions workflow status: ${run_status} "
107+ gh run view \
108+ --repo " ${repository} " \
109+ --json jobs \
110+ --jq ' .jobs[] | " " + .name + ": " + .status + " " + (.conclusion // "")' \
111+ " ${run_id} "
112+ case " ${run_status} " in
113+ " completed success" )
114+ break
115+ ;;
116+ completed\ * )
117+ echo " GitHub Actions workflow did not complete successfully: ${run_status} "
118+ exit 1
119+ ;;
120+ esac
121+ sleep " ${RELEASE_WATCH_INTERVAL} "
122+ done
125123
126124 mkdir -p " ${rc_id} "
127125
0 commit comments