chore: add semantic-release configuration
- Configure version_toml for pyproject.toml - Configure version_variables for __init__.py - Set up Gitea remote for releases - Auto-update both files on release
This commit is contained in:
parent
aff4017eff
commit
fbe5772302
@ -107,3 +107,31 @@ exclude_lines = [
|
||||
"raise NotImplementedError",
|
||||
"if TYPE_CHECKING:",
|
||||
]
|
||||
|
||||
# ========== Semantic Release ==========
|
||||
|
||||
[tool.semantic_release]
|
||||
version_toml = ["pyproject.toml:project.version"]
|
||||
version_variables = ["src/kwork_api/__init__.py:__version__"]
|
||||
branch = "main"
|
||||
build_command = "uv build"
|
||||
commit_parser = "angular"
|
||||
tag_format = "v{version}"
|
||||
major_on_zero = true
|
||||
allow_zero_version = true
|
||||
|
||||
[tool.semantic_release.commit_parser_options]
|
||||
minor_tags = ["feat"]
|
||||
patch_tags = ["fix", "perf"]
|
||||
breaking_change_tags = ["feat"]
|
||||
|
||||
[tool.semantic_release.remote]
|
||||
type = "gitea"
|
||||
domain = "https://git.much-data.ru"
|
||||
owner = "much-data"
|
||||
repo_name = "kwork-api"
|
||||
token = { env = "GH_TOKEN" }
|
||||
|
||||
[tool.semantic_release.publish]
|
||||
dist_glob_patterns = ["dist/*"]
|
||||
upload_to_vcs_release = true
|
||||
|
||||
@ -28,7 +28,7 @@ from .models import (
|
||||
ProjectsResponse,
|
||||
)
|
||||
|
||||
__version__ = "0.1.0"
|
||||
__version__ = "0.1.0" # Updated by semantic-release
|
||||
__all__ = [
|
||||
"KworkClient",
|
||||
"KworkError",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user