diff --git a/CHANGELOG.md b/CHANGELOG.md index e8d65b01..927ecf38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # Changelog -## [Unreleased] + +## [Unreleased] (ReleaseDate) -## v0.2.2 (2024-01-15) +## [v0.2.2] (2024-01-15) ### Breaking changes @@ -26,3 +27,7 @@ really want to skip the initialization for some great reason, you can use `new_without_init()` instead of `new()`. * `#[savvy]` now accepts `savvy::Sexp` as input. + + +[Unreleased]: https://github.com/yutannihilation/savvy/compare/savvy-v0.2.2...HEAD +[v0.2.2]: https://github.com/yutannihilation/savvy/compare/savvy-v0.2.1...savvy-v0.2.2 diff --git a/Cargo.toml b/Cargo.toml index fcea6509..5e9ab0df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,3 +53,12 @@ pr-run-mode = "plan" [profile.dist] inherits = "release" lto = "thin" + +[workspace.metadata.release] +pre-release-replacements = [ + { file = "CHANGELOG.md", search = "Unreleased", replace = "{{version}}", min = 1 }, + { file = "CHANGELOG.md", search = "\\.\\.\\.HEAD", replace = "...{{tag_name}}", exactly = 1 }, + { file = "CHANGELOG.md", search = "ReleaseDate", replace = "{{date}}", min = 1 }, + { file = "CHANGELOG.md", search = "", replace = "\n## [Unreleased] (ReleaseDate)\n", exactly = 1 }, + { file = "CHANGELOG.md", search = "", replace = "\n[Unreleased]: https://github.com/yutannihilation/savvy/compare/{{tag_name}}...HEAD", exactly = 1 }, +]