Skip to content

ci: a tag pushed by publishing a draft doesn't run the release again - #211

Merged
lippdev merged 1 commit into
mainfrom
ci/tag-push-keeps-published-release
Nov 16, 2026
Merged

lippdev merged 1 commit into
mainfrom
ci/tag-push-keeps-published-release

Conversation

@lippdev

@lippdev lippdev commented Nov 16, 2026

Copy link
Copy Markdown
Owner

What happened on 1.7.0

Publishing the draft (#202) created the v1.7.0 tag, and release.yml also runs on push: tags. That second run (42631569535, 3 minutes after publishing):

  • rebuilt and replaced ConsoleMode-Setup-x64.exe and ConsoleMode-Portable-x64.exe (same commit fd150a2, different files than the ones tested from the draft; the Legacy files weren't touched);
  • rewrote the notes without the "Legacy" downloads section (no legacy input on a push);
  • made winget reject New version: lippdev.ConsoleMode version 1.7.0 microsoft/winget-pkgs#475485: winget.yml had submitted the hash of the tested installer at publish time, and the file changed right after (Error-Hash-Mismatch).

Fix

A guard job runs first. On a tag push, if gh release view <tag> says the release exists and is not a draft, it sets skip=true and build (and so winget) 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

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>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

Pullfrog  | View workflow run | Using gpt-6-luna | 𝕏

@lippdev
lippdev merged commit fddcafe into main Nov 16, 2026
5 checks passed
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