diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-05-24 14:04:23 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-05-24 14:04:23 -0500 |
| commit | 97fe2840395642c8af32b51f343ae28b91db7df6 (patch) | |
| tree | 325790ffc4192ccd2e2f530ea75cfa7cdef4a984 | |
| parent | f0ce6248b993a5dd30f174571f3cd71a85806592 (diff) | |
release: preserve draft stable releases
| -rw-r--r-- | .github/workflows/ci.yml | 24 | ||||
| -rw-r--r-- | CHANGELOG.md | 5 |
2 files changed, 20 insertions, 9 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}" \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 27cd3d6..a276653 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,8 +17,9 @@ follows SemVer (MAJOR.MINOR.PATCH). Two distribution channels: ### Changed - Updated the embedded MO2 integration through upstream 2.5.3 Beta 12. -- Stable release publishing now explicitly clears draft/prerelease state when - updating an existing `v*` release and marks it as the latest stable release. +- Stable release publishing now preserves existing draft `v*` releases while + forcing published stable releases out of prerelease state and marking them + as latest. ### Added - Clearer prefix setup progress and failure logs, including installer exit |
