From 62e37586c829a9bf2ca8725b4427a828252f757c Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sat, 2 Nov 2024 10:50:09 +0200 Subject: [PATCH] chore: add support for semantic-release --- new_release.sh | 1 + pyproject.toml | 64 +++++++++++++++++++++++++++++++++++++- src/sphereproj/__init__.py | 4 ++- 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 new_release.sh diff --git a/new_release.sh b/new_release.sh new file mode 100644 index 0000000..28636c5 --- /dev/null +++ b/new_release.sh @@ -0,0 +1 @@ +semantic-release version --tag --changelog --vcs-release diff --git a/pyproject.toml b/pyproject.toml index 8a239d4..456a7c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,68 @@ Homepage = "https://git.aquila-consortium.org/guilhem_lavaux/pysphereproj" Issues = "https://git.aquila-consortium.org/guilhem_lavaux/pysphereproj/issues" [build-system] -requires = ["setuptools >= 61.0", "numpy", "wheel", "Cython"] +requires = ["setuptools >= 61.0", "numpy", "wheel", "Cython", "python-semantic-release"] build-backend = "setuptools.build_meta" +[tool.semantic_release] +assets = [] +version_toml = [ + "pyproject.toml:project.version", +] +version_variables = [ + "src/sphereproj/__init__.py:__version__" +] +build_command_env = [] +commit_message = "{version}\n\nAutomatically generated by python-semantic-release" +commit_parser = "angular" +logging_use_named_masks = false +major_on_zero = true +allow_zero_version = true +tag_format = "v{version}" + +[tool.semantic_release.branches.main] +match = "(main|master)" +prerelease_token = "rc" +prerelease = false + +[tool.semantic_release.changelog] +template_dir = "templates" +changelog_file = "CHANGELOG.md" +exclude_commit_patterns = [] + +[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 = true + +[tool.semantic_release.commit_author] +env = "GIT_COMMIT_AUTHOR" +default = "semantic-release " + +[tool.semantic_release.commit_parser_options] +allowed_tags = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "style", "refactor", "test"] +minor_tags = ["feat"] +patch_tags = ["fix", "perf"] +default_bump_level = 0 + +[tool.semantic_release.remote] +name = "origin" +type = "gitea" +ignore_token_for_push = false +insecure = false +domain = "git.aquila-consortium.org" + +[tool.semantic_release.publish] +dist_glob_patterns = ["dist/*"] +upload_to_vcs_release = true + + diff --git a/src/sphereproj/__init__.py b/src/sphereproj/__init__.py index 49c414c..249720a 100644 --- a/src/sphereproj/__init__.py +++ b/src/sphereproj/__init__.py @@ -1 +1,3 @@ -from ._project import spherical_projection, project_cic, interp3d \ No newline at end of file +from ._project import spherical_projection, project_cic, interp3d + +__version__ = "1.0"