feat: add semantic release #6
Merged
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.
feat: Add semantic-release for automated releases
Description
This pull request integrates
python-semantic-releaseinto the project to fully automate the versioning, changelog generation, and package publishing process. By adopting an automated release strategy, we can ensure consistency, reduce manual effort, and streamline the process of getting new features and fixes to users.This setup leverages the Conventional Commits standard (which we are already using via
commitizen) to automatically determine version bumps.Key Changes
Dependency Addition:
python-semantic-releasehas been added to the[project.optional-dependencies.build]group inpyproject.toml.Configuration:
[tool.semantic_release]section has been added topyproject.tomlto configure the tool's behavior, including the build command and branch settings.New Release Workflow:
.github/workflows/release.yml, has been created. This workflow is specifically designed to handle the release process.How the New Workflow Works
buildjob checks out the code.semantic-release version, which automatically:versioninpyproject.toml.dist/are uploaded as artifacts.deployjob, which runs after a successful build, downloads the package artifacts.uv publishto upload the new version to PyPI, using theUV_PUBLISH_TOKENsecret.This new process replaces manual version bumping and publishing, creating a robust and automated CI/CD pipeline for releases.