From ea05fa0c3e8256f387c810311ebbaaffe5c3b528 Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Tue, 27 Jun 2023 16:41:59 +1000 Subject: [PATCH] CI: Update the 'nightly' tag along with the release. --- .github/workflows/build.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6083d50c..08fb83c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -114,6 +114,10 @@ jobs: { github_rest DELETE "/repos/${GITHUB_REPOSITORY}/releases/${1}" } + github_delete_tag() + { + github_rest DELETE "/repos/${GITHUB_REPOSITORY}/git/refs/tags/${1}" + } github_create_release() { local payload="{ @@ -156,7 +160,12 @@ jobs: { release_id=$(github_get_release_id_for_tag nightly); status=$?; } || true # Delete existing nightly release if it exists. case ${status} in - 0) github_delete_release_by_id "${release_id}" ;; + 0) + github_delete_release_by_id "${release_id}" + # Deleting the 'nightly' release doesn't delete + # the 'nightly' tag, so let's do it manually. + github_delete_tag nightly + ;; 22) >&2 echo "No current nightly release; skipping tag deletion." ;; *) >&2 echo "API call failed unexpectedly." && exit 1 ;; esac