Create GitHub Release automatically when a tag publishes to PyPI - #47
Merged
Conversation
…rsions Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ssy8nmvQp1U5d73pCMFNXi
anna-opal
marked this pull request as ready for review
July 30, 2026 23:30
anna-opal
approved these changes
Jul 30, 2026
rahul-opal
approved these changes
Jul 30, 2026
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.
Requested via Slack thread
Before: Pushing a
v*tag publishes to PyPI, but the Releases page stays stale — GitHub Releases were created by hand. Worse, a no-op upload still shows a green run:twine upload --skip-existingexits 0 even when it uploads nothing, which is how the broken v1.0.6/v1.0.7 tags looked successful.After: Every successful publish automatically creates the matching GitHub Release with generated notes, and a tag whose version already exists on PyPI fails the run instead of silently doing nothing — so the Releases page reflects exactly what actually published.
How: Two changes to
.github/workflows/build-and-publish-to-pypi.yml:--skip-existingfrom the twine upload, so duplicate versions fail loudly (and skip the release step).Create GitHub Releasestep after the upload that runsgh release create(preinstalled on GitHub-hosted runners) for the pushed tag with--generate-notes, plus a job-levelpermissions: contents: writeblock scoped to this job.Builds on #46.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ssy8nmvQp1U5d73pCMFNXi
Generated by Claude Code