Skip to content

Single-source the version and add a release workflow - #50

Merged
markbac merged 1 commit into
mainfrom
chore/20-versioning-release
Oct 3, 2026
Merged

markbac merged 1 commit into
mainfrom
chore/20-versioning-release

Conversation

@markbac

@markbac markbac commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Summary

The version was hardcoded in pyproject.toml, the repository had no release process, and there were no tags.

Changes

  • pylogkit/_version.py holds the version. pyproject.toml reads it dynamically, so the build does not import the package or its dependencies, and pylogkit.__version__ exposes it.
  • .github/workflows/release.yml runs on v* tags. It checks that the tag matches the version, builds the sdist and wheel, runs twine check and creates a GitHub release with generated notes.
  • docs/releasing.md documents the steps and the changelog convention.
  • Tests cover the single source of the version and the tag check in the workflow.

Not included

Publishing to PyPI is left out on purpose. The name pylogkit is taken there by an unrelated project (#44), so the distribution name has to be decided first. The release document says how to add trusted publishing afterwards. No tag is created by this change.

Verification

  • A local build produces pylogkit-0.1.0 with matching wheel metadata.
  • pytest, ruff and mypy --strict pass with the latest dependencies, and pytest passes with no extras.

Closes #20

🤖 Generated with Claude Code

https://claude.ai/code/session_01U2nYHVGDdthQpcwNBPbp8r


Generated by Claude Code

## Summary

The version was hardcoded in `pyproject.toml`, the repository had no release process, and there were no tags.

## Changes

- `pylogkit/_version.py` holds the version. `pyproject.toml` reads it dynamically, so the build does not import the package or its dependencies, and `pylogkit.__version__` exposes it.
- `.github/workflows/release.yml` runs on `v*` tags. It checks that the tag matches the version, builds the sdist and wheel, runs `twine check` and creates a GitHub release with generated notes.
- `docs/releasing.md` documents the steps and the changelog convention.
- Tests cover the single source of the version and the tag check in the workflow.

## Not included

Publishing to PyPI is left out on purpose. The name `pylogkit` is taken there by an unrelated project (#44), so the distribution name has to be decided first. The release document says how to add trusted publishing afterwards. No tag is created by this change.

## Verification

- A local build produces `pylogkit-0.1.0` with matching wheel metadata.
- `pytest`, `ruff` and `mypy --strict` pass with the latest dependencies, and `pytest` passes with no extras.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U2nYHVGDdthQpcwNBPbp8r
@markbac
markbac merged commit 2bf4b8f into main Oct 3, 2026
9 checks passed
@markbac
markbac deleted the chore/20-versioning-release branch October 19, 2026 08:53
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.

Versioning, changelog and release process

2 participants