Make the release job idempotent on re-run#17
Conversation
Guard gh release create with a release-exists check so an Actions re-run after a transient failure skips creation instead of hard-failing. A re-run reuses the original push payload, so the retag guard does not protect against it.
There was a problem hiding this comment.
Pull request overview
Makes the tag-triggered GitHub Release publishing step recoverable on GitHub Actions re-runs by avoiding a hard failure when the Release already exists.
Changes:
- Add an existence check (
gh release view … || gh release create …) before creating a GitHub Release on tag push. - Document the re-run behavior rationale inline in the workflow step.
Review — approvedThe bare-Release counterpart to the same idempotency fix — Copilot's review is summary-only (no findings) and accurate. CI green (full R matrix + coverage; the Windows job was still finishing but the change is workflow-only). No open concerns — good to merge. This comment is the sign-off — formal Approve isn't available on one's own PR. Generated by Claude Code |
Follow-up to #16: make the release job recoverable on an Actions re-run.
gh release createhas no guard for an already-existing Release, so a re-run after a transient failure would hard-fail. A re-run reuses the original push payload (createdstaystrue), so the retag guard does not protect against it. Guard the create with agh release view … || gh release createexistence check. The dev-snapshot Release attaches no asset, so nothing needs re-doing on the skip path.