Repository navigation
Publish a GitHub Release when a version tag is pushed - #41
Merged
Merged
Conversation
The repo gained its first tag (v0.2.40) but nothing was wired to tags, so a tag produced no downloadable artifact. release.yml already builds the zipapp, but it uploads it as a CI artifact, which expires in 90 days and is awkward to link. Pushing v* now runs a publish job that builds the zipapp and creates a GitHub Release with it attached. It runs after the test matrix, so a tag cannot publish a build that does not pass, and it refuses outright when the tag disagrees with __version__ — verified by running that check against both a matching and a mismatched tag. The version job stays gated on pull_request: a tag push has no PR number to check against. This keeps the two concepts separate. __version__ is the per-PR build identity; a tag is the marker for the builds worth handing to someone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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
v0.2.40was the repo's first tag, but nothing was wired to tags — so it produced no downloadable artifact. Pushingv*now builds the zipapp and creates a GitHub Release with it attached.Why not the existing artifact
release.ymlalready buildsglean-code.pyz, but uploads it viaactions/upload-artifact, which expires after 90 days and can't be linked from a changelog. A Release asset is permanent and addressable.Safeguards
needs: test— a tag cannot publish a build that doesn't pass the matrix.__version__. I ran that check locally against both a matching tag (v0.2.41→ passes) and a mismatched one (v9.9.9→::error::and exit 1).versionjob stays PR-only — a tag push has no PR number to check against.The two concepts stay separate
__version__is the per-PR build identity (0.2.<PR>, this one is0.2.41). A tag marks the builds worth handing to someone. Not every PR needs a tag.🤖 Generated with Claude Code