Compare commits

..

2 Commits

Author SHA1 Message Date
6459347610 Generate changelog in CI before publishing.
All checks were successful
continuous-integration/drone/push Build is passing
2022-03-18 17:58:45 -05:00
1846d2f6c6 More automated release configuration. 2022-03-18 17:03:07 -05:00
3 changed files with 6 additions and 5 deletions

View File

@ -15,7 +15,9 @@ steps:
- name: release - name: release
image: rust image: rust
commands: commands:
- cargo publish - cargo install -f git-cliff
- git-cliff --output CHANGELOG.md
- cargo publish --allow-dirty
when: when:
event: event:
- tag - tag

View File

@ -15,4 +15,3 @@ rand = "0.8"
[package.metadata.release] [package.metadata.release]
tag-prefix = "" tag-prefix = ""
publish = false publish = false
pre-release-hook = ["git cliff --tag {{tag_name}} --output CHANGELOG.md", "git add CHANGELOG.md", "git commit CHANGELOG.md -m 'Update changelog for release.'"]

View File

@ -10,9 +10,9 @@ All notable changes to this project will be documented in this file.\n
# https://tera.netlify.app/docs/#introduction # https://tera.netlify.app/docs/#introduction
body = """ body = """
{% if version %}\ {% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} ## Version {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\ {% else %}\
## [unreleased] ## Unreleased
{% endif %}\ {% endif %}\
{% for group, commits in commits | group_by(attribute="group") %} {% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }} ### {{ group | upper_first }}