This Repository is no longer maintained
The functionality of this Cake Addin has been integrated into Cake.GitHub
A Cake Addin to create GitHub Releases from a Cake Build.
The addin currently provides a single Cake script alias GitHubReleaseCreateAsync()
.
To use the addin in a Cake script file, perform the following steps
Add the preprocessor directive to install the addin
#addin nuget:?package=Cake.GitHubReleases&version=VERSION
To create a GitHub Release, call GitHubReleaseCreateAsync()
from a task:
Task("CreateGitHubRelease")
.Does(async () =>
{
var settings = new GitHubReleaseCreateSettings(
repositoryOwner: "owner",
repositoryName: "repo",
tagName: "v1.2.3")
{
// Set the name of the release (defaults to the tag name when not specified)
Name = $"v1.2.3",
// The release's description as Markdown string (optional)
Body = "Description",
// Set to true to create a draft release (default: false)
Draft = false,
// Set to true to mark the release as prerelease (default: false)
Prerelease = false,
// The id of the commit to create the release from
// (uses the HEAD commit of the repo's default branch if not specified)
TargetCommitish = "abc123",
// Set the GitHub access token to use for authentication
AccessToken = accessToken,
// Overwrite will delete any existing commit with the same tag name if it exists
Overwrite = false
};
GitHubReleaseCreateAsync(settings);
});
Building the project from source requires the .NET 5 SDK (version 5.0.400 as specified in global.json).
To build the project, run
.\build.ps1
This will
The version of the library is automatically derived from git and the information
in version.json
using Nerdbank.GitVersioning:
-pre
suffix).-pre
suffix-pre
prerelease tag and the git
commit hash included in the version stringTo create a new release branch use the nbgv
tool:
dotnet tool install --global nbgv
nbgv prepare-release