You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build-release-task: surgical artifact delete runs even when the release create/refresh step is skipped #217
On a scheduled run where the release tag already exists and there are no new commits, the create step is skipped (release exists, not a dispatch), but build-nugetlibrary still uploaded the release-asset-<branch>-* artifacts, and the delete step still removes them — even though nothing was published or refreshed this run.
Impact
Low but real: the delete step's stated intent is "the transfer artifacts now have durable copies on the release, so delete them." When the create step is skipped, that premise doesn't hold for this run — the freshly built artifact was never attached to a release this run. The durable copy on the pre-existing release is from the original creation, and the upload carries retention-days: 1, so nothing is permanently lost; but the fresh artifact is removed immediately instead of being available for the run's lifetime (e.g. to inspect an unexpected rebuild).
Proposed fix
Gate the delete step on the same condition as the create step, so it only runs when a release was actually created/refreshed this run; otherwise let retention-days: 1 reap the artifacts:
(Both steps are in the same github-release job, so steps.release-exists.outputs.exists is in scope for the delete step.)
Context
Found via Copilot review during the downstream re-sync of #213/#214. Reporting upstream rather than diverging locally; will pull the fix down on the next template re-sync.
Fixed on develop via #218 (8d508ce): the delete step now gates on the same exists=='false' || workflow_dispatch condition as the create step, so a scheduled re-run on an existing tag no longer deletes the freshly built artifacts. Ships on the next develop → main release.
Activity
Gate asset delete on the release create/refresh condition (#218)
ptr727 commentedon Jun 26, 2026
Fixed on
developvia #218 (8d508ce): the delete step now gates on the sameexists=='false' || workflow_dispatchcondition as the create step, so a scheduled re-run on an existing tag no longer deletes the freshly built artifacts. Ships on the nextdevelop→mainrelease.