From 451c1a3f41816f36569d480ea507c90ae71d8a01 Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sun, 5 Jan 2025 12:20:08 +0100 Subject: [PATCH 1/2] Update release instructions --- .../contributing/how-to-release.md | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/docs/input/documentation/contributing/how-to-release.md b/docs/input/documentation/contributing/how-to-release.md index 6ff7b63a7..d4e16db57 100644 --- a/docs/input/documentation/contributing/how-to-release.md +++ b/docs/input/documentation/contributing/how-to-release.md @@ -3,6 +3,59 @@ title: How to release addins description: Instructions how to release individual Cake Issues addins. --- -See [Cake.Recipe documentation] how to create a new release of this addin. +## Preparation + +* Make sure that a GitHub milestone exists for this release. +* Make sure for all issues and pull requests which should appear in release notes appropriate labels and the correct milestone is set. + +## Start release + +* Create a release branch (eg. `release/1.2.3`) + + ```bash + git switch develop + git pull origin develop + git checkout -b release/ develop + ``` + +* Create release notes draft + + === ":material-microsoft-windows: Windows" + + ```powershell + $Env:GH_TOKEN="" + .\build.ps1 --target=releasenotes + ``` + + === ":material-apple: macOS" + + ```bash + export GH_TOKEN="" + ./build.sh --target=releasenotes + ``` + + === ":material-linux: Linux" + + ```bash + export GH_TOKEN="" + ./build.sh --target=releasenotes + ``` + +* Update `releaseNotes` tags in `nuspec\nuget\*.nuspec` +* Add news entry to `docs\input\news\posts` + +## Finish release + +* Merge release branch + + ```bash + git switch master + git pull origin master + git merge --no-ff release/ -m "Merge branch 'release/5.1.0'" + git switch develop + git merge --no-ff master + ``` + +Follow instructions for [Cake.Recipe documentation] how to create a new release of this addin. [Cake.Recipe documentation]: https://cake-contrib.github.io/Cake.Recipe/docs/usage/creating-release From 6e2d7666fcdf0533e46072181fc3845fabdc958e Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sun, 5 Jan 2025 12:20:30 +0100 Subject: [PATCH 2/2] Script release creation in Cake --- recipe.cake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/recipe.cake b/recipe.cake index c0e49bee6..00114bdf9 100644 --- a/recipe.cake +++ b/recipe.cake @@ -209,6 +209,43 @@ Task("BreakBuildOnIssues") IssuesBuildTasks.IssuesTask .IsDependentOn("BreakBuildOnIssues"); +Task("Create-ReleaseBranch") + .Description("Creates a new release branch.") + .Does((data) => +{ + if (data.Issues.Any()) + { + throw new Exception("Issues found in code."); + } +}); + +Task("Update-ReleaseNotesLinks") + .Description("Updates links to release notes in NuGet packages.") + .Does((data) => +{ + if (data.Issues.Any()) + { + throw new Exception("Issues found in code."); + } +}); + +Task("Create-NewsEntry") + .Description("Create a draft news entry.") + .Does((data) => +{ + if (data.Issues.Any()) + { + throw new Exception("Issues found in code."); + } +}); + +Task("Create-Release") + .Description("Starts a new release.") + .IsDependentOn("Create-ReleaseBranch") + .IsDependentOn("Releasenotes") + .IsDependentOn("Update-ReleaseNotesLinks") + .IsDependentOn("Create-NewsEntry") + //************************************************************************************************* // Execution //*************************************************************************************************