Skip to content

Commit af85b84

Browse files
committed
ci: added semantic-release files
1 parent e458284 commit af85b84

File tree

4 files changed

+153
-0
lines changed

4 files changed

+153
-0
lines changed

execution_engine/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.0.0"

pyproject.toml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel", "Cython"]
3+
4+
[tool.semantic_release]
5+
version_variable = "execution_engine/version.py:__version__"
6+
assets = []
7+
build_command_env = []
8+
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
9+
commit_parser = "angular"
10+
logging_use_named_masks = false
11+
major_on_zero = false
12+
allow_zero_version = false
13+
tag_format = "v{version}"
14+
15+
[tool.semantic_release.branches.main]
16+
match = "(main|master)"
17+
prerelease = false
18+
19+
[tool.semantic_release.branches.dev]
20+
match = "^dev$"
21+
prerelease = true
22+
prerelease_token = "rc"
23+
24+
[tool.semantic_release.branches.other]
25+
match = ".*"
26+
prerelease = true
27+
prerelease_token = "snapshot"
28+
29+
[tool.semantic_release.changelog]
30+
template_dir = "templates"
31+
changelog_file = "CHANGELOG.md"
32+
exclude_commit_patterns = []
33+
34+
[tool.semantic_release.changelog.environment]
35+
block_start_string = "{%"
36+
block_end_string = "%}"
37+
variable_start_string = "{{"
38+
variable_end_string = "}}"
39+
comment_start_string = "{#"
40+
comment_end_string = "#}"
41+
trim_blocks = false
42+
lstrip_blocks = false
43+
newline_sequence = "\n"
44+
keep_trailing_newline = false
45+
extensions = []
46+
autoescape = true
47+
48+
[tool.semantic_release.commit_author]
49+
env = "GIT_COMMIT_AUTHOR"
50+
default = "semantic-release <semantic-release>"
51+
52+
[tool.semantic_release.commit_parser_options]
53+
allowed_tags = ["feat", "build", "chore", "ci", "docs", "fix", "perf", "style", "refactor", "test", "tests", "revert"]
54+
minor_tags = ["feat"]
55+
patch_tags = ["fix", "perf"]
56+
default_bump_level = 0
57+
58+
[tool.semantic_release.remote]
59+
name = "origin"
60+
type = "github"
61+
ignore_token_for_push = false
62+
insecure = false
63+
64+
[tool.semantic_release.remote.token]
65+
env = "GH_TOKEN"
66+
67+
[tool.semantic_release.publish]
68+
dist_glob_patterns = ["dist/*"]
69+
upload_to_vcs_release = true

templates/.release_notes.md.j2

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## What's Changed
2+
{%- set types = ["feature", "fix"] -%}
3+
{% for type_ in types %}
4+
{%- if release["elements"][type_] is defined and release["elements"][type_]|length > 0 %}
5+
### {{ type_ | capitalize }}
6+
{% for commit in release["elements"][type_] %}
7+
{%- if not commit.message.startswith("Merge pull request") and not commit.message.startswith("Merge branch") -%}
8+
* {{ commit.descriptions[0] }} in [`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }})
9+
{% endif -%}
10+
{%- endfor -%}
11+
{%- endif -%}
12+
{%- endfor -%}
13+
14+
{%- for type_, commits in release["elements"] | dictsort %}
15+
{%- if type_ not in types and commits|length > 0 %}
16+
### {{ type_ | capitalize }}
17+
{% for commit in commits %}
18+
{%- if not commit.message.startswith("Merge pull request") and not commit.message.startswith("Merge branch") -%}
19+
{%- if type_ != "unknown" -%}
20+
* {{ commit.descriptions[0] }} in [`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }})
21+
{% else -%}
22+
* {{ commit.commit.message.split('\n')[0].rstrip() }} in [`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }})
23+
{% endif -%}
24+
{% endif %}
25+
{%- endfor -%}
26+
{%- endif -%}
27+
{%- endfor -%}

templates/CHANGELOG.md.j2

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# CHANGELOG
2+
{%- set types = ["feature", "fix"] -%}
3+
{% if context.history.unreleased | length > 0 %}
4+
5+
## Unreleased
6+
{% for type_ in types %}
7+
{%- if context.history.unreleased[type_] is defined and context.history.unreleased[type_]|length > 0 %}
8+
### {{ type_ | capitalize }}
9+
{% for commit in context.history.unreleased[type_] %}
10+
{%- if not commit.message.startswith("Merge pull request") and not commit.message.startswith("Merge branch") -%}
11+
* {{ commit.message.split('\n')[0].rstrip() }} ([`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }}))
12+
{% endif -%}
13+
{%- endfor -%}
14+
{%- endif -%}
15+
{%- endfor -%}
16+
17+
{%- for type_, commits in context.history.unreleased | dictsort -%}
18+
{%- if type_ not in types and commits|length > 0 %}
19+
### {{ type_ | capitalize }}
20+
{% for commit in commits %}
21+
{%- if not commit.message.startswith("Merge pull request") and not commit.message.startswith("Merge branch") -%}
22+
* {{ commit.message.split('\n')[0].rstrip() }} ([`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }}))
23+
{% endif -%}
24+
{%- endfor -%}
25+
{%- endif -%}
26+
{%- endfor -%}
27+
{%- endif -%}
28+
29+
30+
31+
{% for version, release in context.history.released.items() %}
32+
{# RELEASED #}
33+
## {{ version.as_semver_tag() }} ({{ release.tagged_date.strftime("%Y-%m-%d") }})
34+
35+
{% for type_ in types %}
36+
{%- if release["elements"][type_] is defined and release["elements"][type_]|length > 0 %}
37+
### {{ type_ | capitalize }}
38+
{% for commit in release["elements"][type_] %}
39+
{%- if not commit.message.startswith("Merge pull request") and not commit.message.startswith("Merge branch") -%}
40+
* {{ commit.message.split('\n')[0].rstrip() }} ([`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }}))
41+
{% endif -%}
42+
{%- endfor -%}
43+
{%- endif -%}
44+
{%- endfor -%}
45+
46+
{%- for type_, commits in release["elements"] | dictsort -%}
47+
{%- if type_ not in types and commits|length > 0 %}
48+
### {{ type_ | capitalize }}
49+
{% for commit in commits %}
50+
{%- if not commit.message.startswith("Merge pull request") and not commit.message.startswith("Merge branch") -%}
51+
* {{ commit.message.split('\n')[0].rstrip() }} ([`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }}))
52+
{% endif -%}
53+
{%- endfor -%}
54+
{%- endif -%}
55+
{%- endfor -%}
56+
{%- endfor -%}

0 commit comments

Comments
 (0)