From fb750983402dfca7c6e9e5afc40b1b6c8df114ee Mon Sep 17 00:00:00 2001 From: Andreas Huber <43344129+okaerin@users.noreply.github.com> Date: Sat, 22 Feb 2025 10:06:20 +0100 Subject: [PATCH 1/5] rename unrelease --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 9a61575..e0748ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,6 +59,12 @@ repository = "https://github.com/jeertmans/languagetool-rust" rust-version = "1.74.0" version = "2.1.4" +[package.metadata.release] +pre-release-replacements = [ + {file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1}, + {file="CHANGELOG.md", search="\\.\\.\\.HEAD\\)", replace="...{{version}}) {{date}}", exactly=1}, +] + [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] From 22c67571f95c00bee725e9e8ed0fc07c1234a15d Mon Sep 17 00:00:00 2001 From: Andreas Huber <43344129+okaerin@users.noreply.github.com> Date: Sat, 22 Feb 2025 10:09:16 +0100 Subject: [PATCH 2/5] prepare next unreleased section --- CHANGELOG.md | 2 ++ Cargo.toml | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d769b4..5b594c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ 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.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + ## [Unreleased](https://github.com/jeertmans/languagetool-rust/compare/v2.1.4...HEAD) ### Chore diff --git a/Cargo.toml b/Cargo.toml index e0748ea..88b607c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,6 +63,7 @@ version = "2.1.4" pre-release-replacements = [ {file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1}, {file="CHANGELOG.md", search="\\.\\.\\.HEAD\\)", replace="...{{version}}) {{date}}", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n\n## [Unreleased](https://github.com/jeertmans/languagetool-rust/compare/v{{version}}...HEAD)", exactly=1}, ] [package.metadata.docs.rs] From 1b45f6f8d042fe5cff2700d456d75a3bfedeb51f Mon Sep 17 00:00:00 2001 From: Andreas Huber <43344129+okaerin@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:26:53 +0100 Subject: [PATCH 3/5] add release process and changelog update --- CHANGELOG.md | 1 + RELEASE-PROCESS.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 RELEASE-PROCESS.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b594c7..251b25f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed some types. [#115](https://github.com/jeertmans/languagetool-rust/pull/115) - Derive `Hash` on requests types. [#114](https://github.com/jeertmans/languagetool-rust/pull/114) - Use Codspeed and `check-changelog` actions. [#121](https://github.com/jeertmans/languagetool-rust/pull/121) +- Use `cargo release` and add `RELEASE-PROCESS.md` [#130](https://github.com/jeertmans/languagetool-rust/pull/130) ### Fixed diff --git a/RELEASE-PROCESS.md b/RELEASE-PROCESS.md new file mode 100644 index 0000000..f7670f6 --- /dev/null +++ b/RELEASE-PROCESS.md @@ -0,0 +1,22 @@ +# Release process + +First, make sure you are logged-in https://crates.io with: `cargo login`. +If you don't have write access to **LanguageTool-Rust**' crates, you can still +perform steps 1-4, and ask a maintainer with accesses to perform step 5. + +This project uses `cargo-release` to publish all packages with more ease. +Note that, by default, every command runs in *dry mode*, and you need to append `--execute` +to actually perform the action. + +Here are the following steps to release a new version: + +1. create a branch `release-x.y.z` from the `main` branch; +2. run and commit `cargo release version --workspace `; +3. run and commit `cargo release replace --workspace`; +4. push your branch and create a pull request; +5. and, once your branch was merged to `main`, run the following: + ```bash + cargo release publish --package languagetool-rust + ``` + +And voilĂ ! From 6938b9bec5410acc92cafa89952571468cccc20b Mon Sep 17 00:00:00 2001 From: Andreas Huber <43344129+okaerin@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:29:28 +0100 Subject: [PATCH 4/5] add cargo release install cmd --- RELEASE-PROCESS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASE-PROCESS.md b/RELEASE-PROCESS.md index f7670f6..407060e 100644 --- a/RELEASE-PROCESS.md +++ b/RELEASE-PROCESS.md @@ -8,6 +8,10 @@ This project uses `cargo-release` to publish all packages with more ease. Note that, by default, every command runs in *dry mode*, and you need to append `--execute` to actually perform the action. +Here are the the following steps to install `cargo-release`: +```bash +cargo install cargo-release +``` Here are the following steps to release a new version: 1. create a branch `release-x.y.z` from the `main` branch; From 8ead32c5118c53173e828aa04da30b543bda862e Mon Sep 17 00:00:00 2001 From: Andreas Huber <43344129+okaerin@users.noreply.github.com> Date: Mon, 24 Feb 2025 13:39:11 +0100 Subject: [PATCH 5/5] omit workspace --- RELEASE-PROCESS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE-PROCESS.md b/RELEASE-PROCESS.md index 407060e..eaadbaa 100644 --- a/RELEASE-PROCESS.md +++ b/RELEASE-PROCESS.md @@ -15,8 +15,8 @@ cargo install cargo-release Here are the following steps to release a new version: 1. create a branch `release-x.y.z` from the `main` branch; -2. run and commit `cargo release version --workspace `; -3. run and commit `cargo release replace --workspace`; +2. run and commit `cargo release version `; +3. run and commit `cargo release replace`; 4. push your branch and create a pull request; 5. and, once your branch was merged to `main`, run the following: ```bash