feat: release from GitHub tag (hatch-vcs, no manual version bumps) - #60
Draft
arhangel66 wants to merge 1 commit into
Draft
feat: release from GitHub tag (hatch-vcs, no manual version bumps)#60arhangel66 wants to merge 1 commit into
arhangel66 wants to merge 1 commit into
Conversation
- pyproject.toml switches to dynamic version sourced by hatch-vcs - lium/__about__.py re-exports version written to lium/_version.py at build - release workflow triggers on release:published and skips manual version input - tag name (e.g. v0.0.8) becomes the single source of truth for CLI, wheel, and GitHub release assets
arhangel66
marked this pull request as draft
May 1, 2026 06:53
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
hatch-vcs; no manual edits inpyproject.toml/__about__.pyfor releasesrelease: published— create a GitHub release in UI → everything builds and shipsworkflow_dispatchkept as a fallback withbuild-only/github-release/full-releasemodes for ad-hoc runs (without a tag input)How a release works now
v0.0.8on the target commit, write notes, click Publish release.Version
0.0.8is baked into the wheel,lium --version, and asset names — no files edited.Implementation notes
pyproject.toml:dynamic = [\"version\"]+[tool.hatch.version] source = \"vcs\"+[tool.hatch.build.hooks.vcs] version-file = \"lium/_version.py\"local_scheme = \"no-local-version\"so PyPI accepts dev builds when neededlium/__about__.pynow re-exports from the generatedlium/_version.pywith a0.0.0+unknownfallbacklium/_version.pyadded to.gitignore(written at build time by hatch-vcs)checkout@v4steps now usefetch-depth: 0so hatch-vcs can see the tag/history inside Docker and macOS runners_version.pyas part of theliumpackage;get_version()fallback chain still honorsLIUM_BUILD_VERSIONStacked on
#58 and #59. Merge order: #58 → #59 → this.
Test plan
uv synclocally populateslium/_version.pywith a sensible dev versionworkflow_dispatchwithbuild-onlypasses (builds wheel + all binaries, no publish)v0.0.X-teston a throwaway commit → workflow publishes release assets + PyPI (TestPyPI if configured)lium --versionof the freshly built binary shows0.0.X-test