Generate changelog in CI before publishing.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nolan Darilek 2022-03-18 17:58:45 -05:00
parent 1846d2f6c6
commit 6459347610
4 changed files with 5 additions and 25 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

@ -1,18 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
## [unreleased]
### Miscellaneous Tasks
- More automated release configuration.
## Version 0.1.0 - 2022-03-18
### Miscellaneous Tasks
- Rename crate and set up automated releases.
- Remove demo.
<!-- generated by git-cliff -->

View File

@ -14,8 +14,4 @@ rand = "0.8"
[package.metadata.release] [package.metadata.release]
tag-prefix = "" tag-prefix = ""
publish = false publish = false
pre-release-hook = "git-cliff --output CHANGELOG.md"
pre-release-replacements = [
{file="CHANGELOG.md", search="## Unreleased", replace="## Version {{version}} - {{date}}"},
]

View File

@ -12,7 +12,7 @@ body = """
{% if version %}\ {% if version %}\
## 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 }}