Skip to content

fix(publish): verify release by id after upload, not by tag - #327

Merged
Finesssee merged 1 commit into
mainfrom
fix-publish-release-query
Aug 15, 2026
Merged

fix(publish): verify release by id after upload, not by tag#327
Finesssee merged 1 commit into
mainfrom
fix-publish-release-query

Conversation

@Finesssee

Copy link
Copy Markdown
Collaborator

Bug

After gh release upload succeeds, the script re-queried the release by tag (releases/tags/{tag}) to confirm it was still a draft. GitHub's API can 404 transiently on the by-tag endpoint immediately after an asset upload (eventual consistency). This caused:

Release v0.49.2 disappeared or is no longer draft after uploading CodexBar-0.49.2-Setup.exe.

…even though the draft release still existed and the asset uploaded fine.

Fix

Add Get-ReleaseById (repos/{repo}/releases/{id}) and use it for the post-upload verification. The release id is already known from the in-progress `` object, so by-id is deterministic and avoids the transient by-tag 404.

Verified: PowerShell parser check passes (PARSE_OK).

Get-Release queries releases/tags/{tag} which can 404 transiently right
after gh release upload due to GitHub API eventual consistency. The
post-upload check (line 267) then saw $null and threw 'Release
disappeared or is no longer draft', failing publish after the first
asset uploaded successfully.

Add Get-ReleaseById (repos/{repo}/releases/{id}) and use it for the
post-upload verification. The release id is already known from the
in-progress $release object, so by-id is deterministic and avoids the
transient by-tag 404.
@Finesssee
Finesssee merged commit 9736270 into main Aug 15, 2026
2 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