Conversation
The publish-release job's actions/github-script step called github.rest.repos.getReleaseByTag(tag='v0.1.6') and got HTTP 404 even though the draft release existed. Root cause: per https://docs.github.com/rest/releases/releases#get-a-release-by-tag-name 'You cannot get a draft release by its tag name.' The whole point of the create-draft -> build-nuitka -> publish-release pattern is that the release IS still a draft when publish-release fires; the entire pipeline broke because the lookup it relies on explicitly excludes drafts. Switch to github.paginate(github.rest.repos.listReleases) (which DOES include drafts) and find() by tag_name. Error message now includes the actual list of existing tag names so a future mismatch is easy to diagnose. Cleanup applied out-of-band: - v0.1.6 unmarked draft manually so it surfaces in the sidebar. - v0.1.3 / v0.1.4 / v0.1.5 drafts deleted (their corresponding builds had failed at earlier stages; the PyPI versions stand but the GitHub releases were stale).
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.
Summary
Single-commit fix (
3453c02) for thepublish-releasejob's 404 onv0.1.6.What broke
publish-releasecalledgithub.rest.repos.getReleaseByTag(tag='v0.1.6')and got HTTP 404 even though the draft release existed. Per GitHub's docs:The whole point of the
create-draft → build-nuitka → publish-releasepattern is that the release IS still a draft whenpublish-releasefires — so the lookup it relied on explicitly excludes the only thing we care about.Fix
Switch to
github.paginate(github.rest.repos.listReleases)(which DOES include drafts) andfindbytag_name. Error message now includes the actual list of existing tag names so a future tag mismatch is easy to diagnose.Out-of-band cleanup
Applied manually so the user could see the release immediately:
v0.1.6unmarked draft → now Latest in the sidebar withautopapertoppt-windows-x86_64.zip+.sha256attachedv0.1.3/v0.1.4/v0.1.5drafts deleted (their builds had failed at earlier stages; PyPI versions stand)Test plan
v0.1.7→ publish-pypi → draft created → Nuitka build →publish-releasesucceeds via the newlistReleaseslookup →v0.1.7shows up in the sidebar without manual intervention