diff --git a/pyproject.toml b/pyproject.toml index 72d578c..0bc27d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 diff --git a/src/kwork_api/__init__.py b/src/kwork_api/__init__.py index 4d2b799..c0af22a 100644 --- a/src/kwork_api/__init__.py +++ b/src/kwork_api/__init__.py @@ -28,7 +28,7 @@ from .models import ( ProjectsResponse, ) -__version__ = "0.1.0" +__version__ = "0.1.0" # Updated by semantic-release __all__ = [ "KworkClient", "KworkError",