Repository navigation
ci: a tag pushed by publishing a draft doesn't run the release again - #211
Merged
Merged
Conversation
Publishing the 1.7.0 draft created its tag, and the tag push started the Release workflow a second time: it rebuilt and replaced the installer and the portable minutes after they were published, rewrote the notes without the Legacy downloads, and winget rejected the submission made from the tested files because the hash no longer matched. A "guard" job now stops a tag-push run when that tag's release is already published. A pushed tag without a release publishes as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes The release workflow now checks whether a pushed tag already has a published release and skips the build and downstream winget job in that case.
- Tag-push guard Uses the event type and release draft status to skip only duplicate tag-push runs, preserving manual dispatch and tag pushes without an existing published release.
gpt-6-luna | 𝕏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What happened on 1.7.0
Publishing the draft (#202) created the
v1.7.0tag, andrelease.ymlalso runs onpush: tags. That second run (42631569535, 3 minutes after publishing):ConsoleMode-Setup-x64.exeandConsoleMode-Portable-x64.exe(same commitfd150a2, different files than the ones tested from the draft; the Legacy files weren't touched);legacyinput on a push);winget.ymlhad submitted the hash of the tested installer at publish time, and the file changed right after (Error-Hash-Mismatch).Fix
A
guardjob runs first. On a tag push, ifgh release view <tag>says the release exists and is not a draft, it setsskip=trueandbuild(and sowinget) doesn't run. A pushed tag with no release behind it publishes as before; manual runs are never skipped.Checked locally with the same command:
push v1.7.0→ skip,push v9.9.9(no release) → build,workflow_dispatch v1.7.0→ build (and then the existing "tag exists" check stops it). Both workflow files parse.1.7.0 itself is left as it is; 1.7.1 goes out through the draft path with this in place, and the broken 1.7.0 winget PR will be closed in favour of 1.7.1's.
🤖 Generated with Claude Code