Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and script release documentation #1003

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 54 additions & 1 deletion docs/input/documentation/contributing/how-to-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<RELEASE> develop
```

* Create release notes draft

=== ":material-microsoft-windows: Windows"

```powershell
$Env:GH_TOKEN="<YOUR_GITHUB_TOKEN>"
.\build.ps1 --target=releasenotes
```

=== ":material-apple: macOS"

```bash
export GH_TOKEN="<YOUR_GITHUB_TOKEN>"
./build.sh --target=releasenotes
```

=== ":material-linux: Linux"

```bash
export GH_TOKEN="<YOUR_GITHUB_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/<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
37 changes: 37 additions & 0 deletions recipe.cake
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,43 @@ Task("BreakBuildOnIssues")
IssuesBuildTasks.IssuesTask
.IsDependentOn("BreakBuildOnIssues");

Task("Create-ReleaseBranch")
.Description("Creates a new release branch.")
.Does<IssuesData>((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<IssuesData>((data) =>
{
if (data.Issues.Any())
{
throw new Exception("Issues found in code.");
}
});

Task("Create-NewsEntry")
.Description("Create a draft news entry.")
.Does<IssuesData>((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
//*************************************************************************************************
Expand Down