From be0af12441df921967abddc6afcf7c5d6c83916c Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Nov 2026 04:05:53 +0000 Subject: [PATCH] Nightly: no release is no ID (gh writes a 404's body to stdout) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01B82eRTrw1ffsyY5bhTghu1 --- .github/scripts/nightly-publish.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/scripts/nightly-publish.sh b/.github/scripts/nightly-publish.sh index fadf704..a515abb 100755 --- a/.github/scripts/nightly-publish.sh +++ b/.github/scripts/nightly-publish.sh @@ -18,9 +18,12 @@ files=("$dir"/*) [ ${#files[@]} -gt 0 ] || { echo "::error::No files to publish in $dir"; exit 1; } title="Nightly build ($(date -u +%Y-%m-%d), ${sha:0:7})" -# release_id: prints the ID of the "nightly" release, or nothing +# release_id: prints the ID of the "nightly" release, or nothing. (gh +# writes the error body of a 404 to stdout: on an error, print nothing.) release_id() { - gh api "repos/$GH_REPO/releases/tags/nightly" --jq .id 2>/dev/null || true + local id + id=$(gh api "repos/$GH_REPO/releases/tags/nightly" --jq .id 2>/dev/null) || id= + echo "$id" } # move_tag: puts the "nightly" tag at $sha, and makes the tag if it is