From fbba8b7613c76c6a1ae21c81d9f07697320f6d10 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Wed, 21 May 2025 11:11:40 -0600 Subject: [PATCH] ci: add semantic release configuration (and use pyproject version) --- .gitignore | 1 + pyproject.toml | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/.gitignore b/.gitignore index 44087f3..93cb71e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ wheels/ # Aider .aider* .goose +.claude/settings.local.json diff --git a/pyproject.toml b/pyproject.toml index be3202e..bd9389d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,3 +56,71 @@ disallow_incomplete_defs = true dev = [ "pytest>=8.3.5", ] + +[tool.semantic_release] +assets = [] +build_command_env = [] +commit_message = "{version}\n\nAutomatically generated by python-semantic-release" +commit_parser = "conventional" +logging_use_named_masks = false +major_on_zero = true +allow_zero_version = true +repo_dir = "." +no_git_verify = false +tag_format = "v{version}" +version_toml = [ + "pyproject.toml:project.version:nf" +] + +[tool.semantic_release.branches.main] +match = "(main|master)" +prerelease_token = "rc" +prerelease = false + +[tool.semantic_release.changelog] +exclude_commit_patterns = [] +mode = "init" +insertion_flag = "" +template_dir = "templates" + +[tool.semantic_release.changelog.default_templates] +changelog_file = "CHANGELOG.md" +output_format = "md" +mask_initial_release = false + +[tool.semantic_release.changelog.environment] +block_start_string = "{%" +block_end_string = "%}" +variable_start_string = "{{" +variable_end_string = "}}" +comment_start_string = "{#" +comment_end_string = "#}" +trim_blocks = false +lstrip_blocks = false +newline_sequence = "\n" +keep_trailing_newline = false +extensions = [] +autoescape = false + +[tool.semantic_release.commit_author] +env = "GIT_COMMIT_AUTHOR" +default = "semantic-release " + +[tool.semantic_release.commit_parser_options] +minor_tags = ["feat"] +patch_tags = ["fix", "perf"] +other_allowed_tags = ["build", "chore", "ci", "docs", "style", "refactor", "test"] +allowed_tags = ["feat", "fix", "perf", "build", "chore", "ci", "docs", "style", "refactor", "test"] +default_bump_level = 0 +parse_squash_commits = false +ignore_merge_commits = false + +[tool.semantic_release.remote] +name = "origin" +type = "github" +ignore_token_for_push = false +insecure = false + +[tool.semantic_release.publish] +dist_glob_patterns = ["dist/*"] +upload_to_vcs_release = true