Skip to content

Commit 77e1129

Browse files
authored
feat(ci): add the release-pls workflow, add missing config files (#218)
Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me> Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me>
1 parent 5db5e5a commit 77e1129

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

cliff.toml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# configuration file for git-cliff (0.1.0)
2+
3+
[changelog]
4+
# changelog header
5+
header = """
6+
# Changelog
7+
All notable changes to this project will be documented in this file.
8+
9+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
10+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11+
12+
"""
13+
# template for the changelog body
14+
# https://tera.netlify.app/docs/#introduction
15+
body = """
16+
{% if version %}\
17+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
18+
[{{ version | trim_start_matches(pat="v") }}]: https://github.com/steganogram/stegano-rs/compare/{{ previous.version }}...{{ version }}
19+
{% else %}\
20+
## [unreleased]
21+
[Unreleased]: https://github.com/steganogram/stegano-rs/compare/{{ version }}...HEAD
22+
{% endif %}\
23+
{% for group, commits in commits | group_by(attribute="group") %}
24+
### {{ group | upper_first }}
25+
{% for commit in commits %}
26+
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\
27+
{% endfor %}
28+
{% endfor %}\n
29+
"""
30+
# remove the leading and trailing whitespaces from the template
31+
trim = true
32+
# changelog footer
33+
footer = """
34+
<!-- generated by git-cliff -->
35+
"""
36+
37+
[git]
38+
# parse the commits based on https://www.conventionalcommits.org
39+
conventional_commits = true
40+
# filter out the commits that are not conventional
41+
filter_unconventional = true
42+
# process each line of a commit as an individual commit
43+
split_commits = false
44+
# regex for parsing and grouping commits
45+
commit_parsers = [
46+
{ message = "^feat", group = "Features" },
47+
{ message = "^fix", group = "Bug Fixes" },
48+
{ message = "^doc", group = "Documentation" },
49+
{ message = "^perf", group = "Performance" },
50+
{ message = "^refactor", group = "Refactor" },
51+
{ message = "^style", group = "Styling" },
52+
{ message = "^test", group = "Testing" },
53+
{ message = "^chore\\(release\\): prepare for", skip = true },
54+
{ message = "^chore", group = "Miscellaneous Tasks" },
55+
{ body = ".*security", group = "Security" },
56+
]
57+
# protect breaking changes from being skipped due to matching a skipping commit_parser
58+
protect_breaking_commits = false
59+
# filter out the commits that are not matched by commit parsers
60+
filter_commits = true
61+
# glob pattern for matching git tags
62+
tag_pattern = "v[0-9]*"
63+
# regex for skipping tags
64+
skip_tags = "v0.1.0-beta.1"
65+
# regex for ignoring tags
66+
ignore_tags = ""
67+
# sort the tags topologically
68+
topo_order = false
69+
# sort the commits inside sections by oldest/newest order
70+
sort_commits = "newest"

release-plz.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[workspace]
2+
changelog_config = "cliff.toml"
3+
changelog_update = true
4+
git_tag_enable = true
5+
publish = false

0 commit comments

Comments
 (0)