Skip to content

ci: clean up draft release on failed release runs#22

Merged
TMHSDigital merged 1 commit into
mainfrom
ci/release-cleanup
Jun 5, 2026
Merged

ci: clean up draft release on failed release runs#22
TMHSDigital merged 1 commit into
mainfrom
ci/release-cleanup

Conversation

@TMHSDigital
Copy link
Copy Markdown
Owner

Adds cleanup-failed-release (needs create-release + upload-assets, if: failure() and v* tag). On a failed tag release run it deletes the draft release for the tag and the tag ref, so a partial release leaves nothing behind. Only deletes a draft (never published), no-op when nothing matches, contents: write scoped to the job. Validated: rc5 forced one upload leg to fail -> publish-release skipped, cleanup ran and removed the draft + tag; rc6 happy path published all 10 assets with cleanup skipped.

Made with Cursor

Adds a cleanup-failed-release job to the tag release path. The draft-then-publish
flow leaves a draft release if the upload matrix fails partway, since
publish-release is then skipped. That draft is invisible to the public but
lingers until removed by hand.

This job runs only when a tag-triggered release run failed
(if: failure() and ref is a v* tag) and needs the release-stage jobs so it does
not fire on ordinary non-tag build failures. It deletes the draft release for
the tag and the tag ref, so a partial release leaves nothing behind. It only
deletes a draft (never a published release), is a no-op when nothing matches,
and scopes contents: write to itself.

Co-authored-by: Cursor <cursoragent@cursor.com>
@TMHSDigital TMHSDigital merged commit 26fc054 into main Jun 5, 2026
18 checks passed
@TMHSDigital TMHSDigital deleted the ci/release-cleanup branch June 5, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant