6565
6666 steps :
6767 - name : Checkout repository
68- uses : actions/checkout@v4
68+ uses : actions/checkout@v5
6969 with :
7070 fetch-depth : 0
7171 ref : ${{ github.event.pull_request.merge_commit_sha || github.ref }}
9898 echo "Unable to read version from robot_common_launch/package.xml." >&2
9999 exit 1
100100 fi
101- version="${base_version}~main+ ${short_sha}"
101+ version="${base_version}~main. ${short_sha}"
102102 is_prerelease="true"
103103 elif [[ -n "${INPUT_TAG:-}" ]]; then
104104 tag="$INPUT_TAG"
@@ -188,7 +188,7 @@ jobs:
188188
189189 - name : Cache rosdep sources
190190 id : cache-rosdep
191- uses : actions/cache@v4
191+ uses : actions/cache@v5
192192 with :
193193 path : /home/rosdep/.ros/rosdep/sources.cache
194194 key : rosdep-${{ runner.os }}-${{ matrix.arch }}-${{ steps.meta.outputs.ros_distro }}-${{ hashFiles('**/package.xml') }}
@@ -334,7 +334,7 @@ jobs:
334334 echo "deb_path=${GITHUB_WORKSPACE}/${DEB_FILE}" >> "$GITHUB_OUTPUT"
335335
336336 - name : Upload workflow artifact
337- uses : actions/upload-artifact@v4
337+ uses : actions/upload-artifact@v6
338338 with :
339339 name : robot-descriptions-common-${{ steps.meta.outputs.version }}-${{ matrix.arch }}
340340 path : ${{ steps.meta.outputs.deb_file }}
@@ -353,7 +353,7 @@ jobs:
353353
354354 steps :
355355 - name : Checkout repository
356- uses : actions/checkout@v4
356+ uses : actions/checkout@v5
357357 with :
358358 ref : ${{ github.event.pull_request.merge_commit_sha || github.ref }}
359359
@@ -383,7 +383,7 @@ jobs:
383383 echo "Unable to read version from robot_common_launch/package.xml." >&2
384384 exit 1
385385 fi
386- version="${base_version}~main+ ${short_sha}"
386+ version="${base_version}~main. ${short_sha}"
387387 is_prerelease="true"
388388 elif [[ -n "${INPUT_TAG:-}" ]]; then
389389 tag="$INPUT_TAG"
@@ -412,7 +412,7 @@ jobs:
412412 echo "is_prerelease=$is_prerelease" >> "$GITHUB_OUTPUT"
413413
414414 - name : Download built deb artifacts
415- uses : actions/download-artifact@v4
415+ uses : actions/download-artifact@v7
416416 with :
417417 pattern : robot-descriptions-common-${{ steps.meta.outputs.version }}-*
418418 merge-multiple : true
@@ -516,27 +516,46 @@ jobs:
516516 apt-get install -y gh
517517
518518 - name : Download deb from release
519+ id : download-deb
519520 env :
520521 GH_TOKEN : ${{ github.token }}
521522 shell : bash
522523 run : |
523524 set -eo pipefail
524525
525- deb_file ="${{ steps.meta.outputs.deb_file }}"
526+ deb_arch ="${{ matrix.arch }}"
526527 tag="${{ steps.meta.outputs.tag }}"
528+ deb_file=""
529+
527530 for attempt in {1..30}; do
528- rm -f "${deb_file}"
529- if gh release download "$tag" \
531+ rm -f ./*.deb 2>/dev/null || true
532+
533+ if ! gh release view "$tag" --repo "${GITHUB_REPOSITORY}" > /dev/null 2>&1; then
534+ echo "Release ${tag} is not available yet (attempt ${attempt}/30); retrying in 20s..."
535+ sleep 20
536+ continue
537+ fi
538+
539+ gh release download "$tag" \
530540 --repo "${GITHUB_REPOSITORY}" \
531- --pattern "${deb_file}"; then
541+ --pattern "*_${deb_arch}.deb"
542+
543+ deb_file="$(ls -1 *_"${deb_arch}.deb" 2>/dev/null | head -n1 || true)"
544+ if [[ -n "$deb_file" && -f "$deb_file" ]]; then
545+ echo "deb_file=${deb_file}" >> "${GITHUB_OUTPUT}"
532546 break
533547 fi
534- echo "Asset ${deb_file} is not available yet (attempt ${attempt}/30); retrying in 20s..."
548+
549+ echo "Asset *_${deb_arch}.deb is not available yet (attempt ${attempt}/30); retrying in 20s..."
550+ gh release view "$tag" \
551+ --repo "${GITHUB_REPOSITORY}" \
552+ --json assets \
553+ --jq '.assets[].name' || true
535554 sleep 20
536555 done
537556
538- if [[ ! -f "${ deb_file} " ]]; then
539- echo "Timed out waiting for ${deb_file} in release ${tag}." >&2
557+ if [[ -z "$deb_file" || ! -f "$deb_file" ]]; then
558+ echo "Timed out waiting for *_${deb_arch}.deb in release ${tag}." >&2
540559 gh release view "$tag" \
541560 --repo "${GITHUB_REPOSITORY}" \
542561 --json assets \
@@ -551,7 +570,7 @@ jobs:
551570 run : |
552571 set -eo pipefail
553572
554- deb_file="${{ steps.meta .outputs.deb_file }}"
573+ deb_file="${{ steps.download-deb .outputs.deb_file }}"
555574 ros_distro="${{ steps.meta.outputs.ros_distro }}"
556575
557576 dpkg -i "./${deb_file}" || apt-get -f install -y
0 commit comments