| SPDX-FileCopyrightText | SPDX-FileType | SPDX-License-Identifier |
|---|---|---|
2025-2026 PyThaiNLP Project |
DOCUMENTATION |
CC0-1.0 |
How to cut a new release
This project follows semantic versioning.
Prerequisites
Install development dependencies including bump-my-version:
Release Process
-
Check if the package can be built properly
Build the package locally to ensure there are no build errors:
python -m buildYou can also include
[cd build]in a commit message to trigger wheel building in CI. -
Update CHANGELOG.md
Update
CHANGELOG.mdwith a short summary of important changes since the previous stable release. For example, deprecation or termination of support. Follow the Keep a Changelog format. -
Update version using bump-my-version
We use
bump-my-versionto manage version numbers. The configuration is inpyproject.tomlunder[tool.bumpversion].Version format:
MAJOR.MINOR.PATCH[-RELEASE][BUILD]where RELEASE can bedev,beta, or omitted (production).To bump the version:
# For a patch release (e.g., 5.2.0 -> 5.2.1-dev0)
bump-my-version bump patch
# For a minor release (e.g., 5.2.0 -> 5.3.0-dev0)
bump-my-version bump minor
# For a major release (e.g., 5.2.0 -> 6.0.0-dev0)
bump-my-version bump major
# To move from dev to beta (e.g., 5.2.1-dev0 -> 5.2.1-beta0)
bump-my-version bump release
# To move from beta to production (e.g., 5.2.1-beta0 -> 5.2.1)
bump-my-version bump release
# To increment build number (e.g., 5.2.1-dev0 -> 5.2.1-dev1)
bump-my-version bump buildThis command will automatically update version numbers and release dates in:
pyproject.toml- version numberpythainlp/__init__.py- version numberCITATION.cff- version number anddate-releasedfieldcodemeta.json- version number anddateModifiedfield
The release dates are automatically set to the current date when you run the bump command.
It will also create a git commit and tag by default.
-
Update README files if needed
If the release introduces significant changes, update:
README.mdREADME_TH.md
-
Push changes and tag
git push origin dev
git push origin --tags -
Create GitHub Release
Navigate to the releases page and click the "Draft a new release" button. Only project maintainers are able to perform this step.
-
Select the tag
In the "Choose a tag" dropdown, select the tag that was created by
bump-my-version(e.g.,v5.2.1). Tags follow the formatvMAJOR.MINOR.PATCH. -
Set release title
The release title should be the same as the version tag (e.g.,
v5.2.1). -
Add release notes
Add a short summary of important changes since the previous stable release. This should be similar to what has been logged in
CHANGELOG.md. Then click the "Generate release notes" button to auto-generate contributor information. -
Optional: Thank contributors
You can optionally include any particular thank-yous to contributors or reviewers in a note at the bottom of the release.
-
Publish the release
Click the "Publish release" button.
-
Verify CI/CD
If the CI run is successful, then the release will be published on both the GitHub release page and the Python Package Index.