From 645934761023e6b349efa755fd47da862ede2204 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Fri, 18 Mar 2022 17:58:45 -0500 Subject: [PATCH] Generate changelog in CI before publishing. --- .drone.yml | 4 +++- CHANGELOG.md | 18 ------------------ Cargo.toml | 6 +----- cliff.toml | 2 +- 4 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/.drone.yml b/.drone.yml index 5639a8a..b868647 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,7 +15,9 @@ steps: - name: release image: rust commands: - - cargo publish + - cargo install -f git-cliff + - git-cliff --output CHANGELOG.md + - cargo publish --allow-dirty when: event: - tag diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 23a9de5..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -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. - - diff --git a/Cargo.toml b/Cargo.toml index 7409aa0..8189d49 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,8 +14,4 @@ rand = "0.8" [package.metadata.release] tag-prefix = "" -publish = false -pre-release-hook = "git-cliff --output CHANGELOG.md" -pre-release-replacements = [ - {file="CHANGELOG.md", search="## Unreleased", replace="## Version {{version}} - {{date}}"}, -] \ No newline at end of file +publish = false \ No newline at end of file diff --git a/cliff.toml b/cliff.toml index 7edaa36..29f0a26 100644 --- a/cliff.toml +++ b/cliff.toml @@ -12,7 +12,7 @@ body = """ {% if version %}\ ## Version {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }} {% else %}\ - ## [unreleased] + ## Unreleased {% endif %}\ {% for group, commits in commits | group_by(attribute="group") %} ### {{ group | upper_first }}