[workspace]
# Conventional commits drive the version bump.
semver_check = true
changelog_update = true
git_release_enable = true
git_tag_enable = true
publish = true
publish_allow_dirty = false
# Skip publishing on every push; only when the release PR is merged.
release = true
# Skip `cargo publish --verify`. Verification would compile sherpa-onnx-sys
# (a heavy C++ build) just to validate the published tarball, which is
# pointless when CI already builds the crate on every push.
publish_no_verify = true

[changelog]
header = """# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
"""
body = """
## [{{ version }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}\
- {{ commit.message | upper_first }}{% if commit.scope %} *({{ commit.scope }})*{% endif %}
{% endfor %}\
{% endfor %}
"""
commit_parsers = [
  { message = "^feat", group = "Features" },
  { message = "^fix", group = "Bug Fixes" },
  { message = "^perf", group = "Performance" },
  { message = "^refactor", group = "Refactor" },
  { message = "^docs", group = "Documentation" },
  { message = "^test", group = "Testing" },
  { message = "^chore\\(release\\)", skip = true },
  { message = "^chore", group = "Chores" },
  { message = "^ci", group = "CI" },
]
