chore: automate development version and release generation (#772)
Some checks failed
Bump Version / Bump Version Workflow (push) Has been cancelled
docker-build / platform-excludes (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
pre-commit / pre-commit (push) Has been cancelled
Run Pytest on Pull Request / test (push) Has been cancelled

This change introduces a GitHub Action to automate release creation, including
proper tagging and automatic addition of a development marker to the version.

A hash is also appended to development versions to make their state easier to
distinguish.

Tests and release documentation have been updated to reflect the revised
release workflow. Several files now retrieve the current version dynamically.

The test --full-run option has been rename to --finalize to make
clear it is to do commit finalization testing.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
Bobby Noelte
2025-11-20 00:10:19 +01:00
committed by GitHub
parent bdbb0b060d
commit 976a2c8405
28 changed files with 762 additions and 448 deletions

View File

@@ -1,6 +1,6 @@
[project]
name = "akkudoktor-eos"
version = "0.2.0+dev"
dynamic = ["version"] # Get version information dynamically
authors = [
{ name="Andreas Schmitz", email="author@example.com" },
]
@@ -25,6 +25,8 @@ build-backend = "setuptools.build_meta"
[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
optional-dependencies = {dev = { file = ["requirements-dev.txt"] }}
# version.txt must be generated
version = { file = "version.txt" }
[tool.setuptools.packages.find]
where = ["src/"]
@@ -109,29 +111,10 @@ module = "xprocess.*"
ignore_missing_imports = true
[tool.commitizen]
# Only used as linter
name = "cz_conventional_commits"
version_scheme = "semver"
version = "0.2.0+dev" # <-- Set your current version heretag_format = "v$version"
# Files to automatically update when bumping version
update_changelog_on_bump = true
changelog_incremental = true
annotated_tag = true
bump_message = "chore(release): $current_version → $new_version"
# Branch validation settings
# Enforce commit message and branch style:
branch_validation = true
branch_pattern = "^(feat|fix|chore|docs|refactor|test)/[a-z0-9._-]+$"
# Customize changelog generation
[tool.commitizen.changelog]
path = "CHANGELOG.md"
template = "keepachangelog"
# If your version is stored in multiple files (Python modules, docs etc.), add them here
[tool.commitizen.files]
version = [
"pyproject.toml", # Auto-update project version
"src/akkudoktoreos/core/version.py",
"src/akkudoktoreos/data/default.config.json"
]