aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-05-24 14:04:23 -0500
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-05-24 14:04:23 -0500
commit97fe2840395642c8af32b51f343ae28b91db7df6 (patch)
tree325790ffc4192ccd2e2f530ea75cfa7cdef4a984 /.github
parentf0ce6248b993a5dd30f174571f3cd71a85806592 (diff)
release: preserve draft stable releases
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml24
1 files changed, 17 insertions, 7 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 33bf512..0bb0ed2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -191,13 +191,23 @@ jobs:
echo "See CHANGELOG.md for the full list of changes."
} > "${NOTES_FILE}"
- if gh release view "${TAG}" >/dev/null 2>&1; then
- gh release edit "${TAG}" \
- --title "${TITLE}" \
- --notes-file "${NOTES_FILE}" \
- --draft=false \
- --prerelease=false \
- --latest
+ EXISTING_DRAFT="$(gh release view "${TAG}" --json isDraft --jq '.isDraft' 2>/dev/null || true)"
+ if [[ -n "${EXISTING_DRAFT}" ]]; then
+ if [[ "${EXISTING_DRAFT}" == "true" ]]; then
+ gh release edit "${TAG}" \
+ --title "${TITLE}" \
+ --notes-file "${NOTES_FILE}" \
+ --draft \
+ --prerelease=false \
+ --latest=false
+ else
+ gh release edit "${TAG}" \
+ --title "${TITLE}" \
+ --notes-file "${NOTES_FILE}" \
+ --draft=false \
+ --prerelease=false \
+ --latest
+ fi
gh release upload "${TAG}" "${archive_path}" --clobber
else
gh release create "${TAG}" "${archive_path}" \