diff --git a/release-plz.toml b/release-plz.toml index 5b84011..11b8154 100644 --- a/release-plz.toml +++ b/release-plz.toml @@ -1,5 +1,7 @@ [workspace] allow_dirty = true +git_release_type = "auto" +pr_labels = ["release"] [[package]] name = "jpegxl-rs" @@ -8,3 +10,70 @@ publish_features = ["vendored"] [[package]] name = "jpegxl-sys" publish_features = ["vendored"] + +[changelog] +header = """# Changelog + +## [Unreleased] + +""" + +body = """ +{% macro print_commit(commit) -%} + - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ + {% if commit.breaking %}[**breaking**] {% endif %}\ + {{ commit.message | upper_first }} - \ + ([{{ commit.id | truncate(length=7, end="") }}]({{ remote.link }}/commit/{{ commit.id }}))\ +{% endmacro -%} + +{% if version %}\ + {% if previous.version %}\ + ## [{{ version | trim_start_matches(pat="v") }}]({{ release_link }}) + {% else %}\ + ## [{{ version | trim_start_matches(pat="v") }}] + {% endif %}\ +{% endif %}\ + +{% for group, commits in commits +| filter(attribute="merge_commit", value=false) +| unique(attribute="message") +| group_by(attribute="group") %} + ### {{ group | striptags | trim | upper_first }} + {% for commit in commits + | filter(attribute="scope") + | sort(attribute="scope") %} + {{ self::print_commit(commit=commit) }} + {%- endfor -%} + {% raw %}\n{% endraw %}\ + {%- for commit in commits %} + {%- if not commit.scope -%} + {{ self::print_commit(commit=commit) }} + {% endif -%} + {% endfor -%} +{% endfor %}\n +""" + +commit_parsers = [ + { message = "^feat", group = "โ›ฐ๏ธ Features" }, + { message = "^fix", group = "๐Ÿ› Bug Fixes" }, + { message = "^doc", group = "๐Ÿ“š Documentation" }, + { message = "^perf", group = "โšก Performance" }, + { message = "^refactor\\(clippy\\)", skip = true }, + { message = "^refactor", group = "๐Ÿšœ Refactor" }, + { message = "^style", group = "๐ŸŽจ Styling" }, + { message = "^test", group = "๐Ÿงช Testing" }, + { message = "^chore\\(release\\):", skip = true }, + { message = "^chore: release", skip = true }, + { message = "^chore\\(deps.*\\)", skip = true }, + { message = "^chore\\(pr\\)", skip = true }, + { message = "^chore\\(pull\\)", skip = true }, + { message = "^chore\\(npm\\).*yarn\\.lock", skip = true }, + { message = "^chore|^ci", group = "โš™๏ธ Miscellaneous Tasks" }, + { body = ".*security", group = "๐Ÿ›ก๏ธ Security" }, + { message = "^revert", group = "โ—€๏ธ Revert" }, +] + +link_parsers = [ + { pattern = "#(\\d+)", href = "{{ remote.link }}/issues/$1" }, + { pattern = "RFC(\\d+)", text = "ietf-rfc$1", href = "https://datatracker.ietf.org/doc/html/rfc$1" }, +]