NukeBuildHelpers 2.5.0-prerelease.4

This is a prerelease version of NukeBuildHelpers.
This package has a SemVer 2.0.0 package version: 2.5.0-prerelease.4+build.365.
There is a newer version of this package available.
See the version list below for details.
dotnet add package NukeBuildHelpers --version 2.5.0-prerelease.4                
NuGet\Install-Package NukeBuildHelpers -Version 2.5.0-prerelease.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NukeBuildHelpers" Version="2.5.0-prerelease.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NukeBuildHelpers --version 2.5.0-prerelease.4                
#r "nuget: NukeBuildHelpers, 2.5.0-prerelease.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NukeBuildHelpers as a Cake Addin
#addin nuget:?package=NukeBuildHelpers&version=2.5.0-prerelease.4&prerelease

// Install NukeBuildHelpers as a Cake Tool
#tool nuget:?package=NukeBuildHelpers&version=2.5.0-prerelease.4&prerelease                

NukeBuildHelpers

NukeBuildHelpers is a C# project build automation tool built on top of NukeBuild. It supports both GitHub Actions and Azure Pipelines for CI/CD, enabling release management across multiple projects and environments within a single repository.

Features

  • Multi-project and Multi-environment Support: Handle releases for multiple projects and environments in a single repository.
  • CI/CD Integration: Generate GitHub Actions and Azure Pipelines workflows.
  • Automated Versioning: Interactive CLI for bumping project versions with validation.
  • Flexible Build Flow: Override abstract classes to create custom build flows.

Quick Start

Using the Repository Template

To quickly set up a new project, use the NukeBuildTemplate repository template:

  1. Clone the template repository.
  2. Follow the setup instructions in the template.

Installing via NuGet

If you already have a NukeBuild setup, you can install NukeBuildHelpers via NuGet:

dotnet add package NukeBuildHelpers

Usage

Creating Build Flows

To create custom build flows, override the abstract classes AppEntry or AppTestEntry.

Example AppEntry Implementation
namespace _build;

public class NugetBuildHelpers : AppEntry<Build>
{
    public override RunsOnType BuildRunsOn => RunsOnType.Ubuntu2204;
    public override RunsOnType PublishRunsOn => RunsOnType.Ubuntu2204;

    [SecretVariable("NUGET_AUTH_TOKEN")]
    readonly string? NuGetAuthToken;

    [SecretVariable("GITHUB_TOKEN")]
    readonly string? GithubToken;

    public override void Build(AppRunContext appRunContext)
    {
        // Build logic here
    }

    public override void Publish(AppRunContext appRunContext)
    {
        // Publish logic here
    }
}
Example AppTestEntry Implementation
namespace _build;

public class NugetBuildHelpersTest : AppTestEntry<Build>
{
    public override RunsOnType RunsOn => RunsOnType.WindowsLatest;
    public override Type[] AppEntryTargets => [typeof(NugetBuildHelpers)];

    public override void Run(AppTestRunContext appTestRunContext)
    {
        // Test logic here
    }
}

Generating Workflows

Generate GitHub and Azure Pipelines workflows using CLI commands:

# Generate GitHub workflow
build githubworkflow

# Generate Azure Pipelines workflow
build azureworkflow

These commands will generate azure-pipelines.yml and .github/workflows/nuke-cicd.yml respectively.

Bumping Project Version

Use the build bump command to interactively bump the project version:

build bump

CLI Subcommands

  • Fetch: Fetch git commits and tags.
  • Version: Show the current version from all releases.
  • Bump: Interactive, bump the version by validating and tagging.
  • BumpAndForget: Interactive, bump and forget the version by validating and tagging.
  • StatusWatch: Show the current version status from all releases.
  • Test: Run tests.
  • Build: Build the project.
  • Publish: Publish the project.
  • GithubWorkflow: Build the CI/CD workflow for GitHub.
  • AzureWorkflow: Build the CI/CD workflow for Azure.

Versioning and Status

  • The Version subcommand shows the current version from all releases. Example output from the subcommand:
╬══════════════════════╬═════════════╬════════════════════╬═════════════════════╬
║        App Id        ║ Environment ║   Bumped Version   ║      Published      ║
╬══════════════════════╬═════════════╬════════════════════╬═════════════════════╬
║ nuget_build_helpers  ║ prerelease  ║ 2.1.0-prerelease.1 ║ 2.0.0-prerelease.8* ║
║                      ║    main     ║ 2.0.0              ║         yes         ║
║----------------------║-------------║--------------------║---------------------║
║ nuget_build_helpers2 ║ prerelease  ║ 0.1.0-prerelease.2 ║         no          ║
║                      ║    main     ║ -                  ║         no          ║
╬══════════════════════╬═════════════╬════════════════════╬═════════════════════╬
  • The StatusWatch subcommand continuously monitors the version status. Example output from the subcommand:
╬══════════════════════╬═════════════╬════════════════════╬═══════════════╬
║        App Id        ║ Environment ║      Version       ║    Status     ║
╬══════════════════════╬═════════════╬════════════════════╬═══════════════╬
║ nuget_build_helpers  ║ prerelease  ║ 2.1.0-prerelease.2 ║   Published   ║
║                      ║    main     ║ 2.0.0              ║   Published   ║
║----------------------║-------------║--------------------║---------------║
║ nuget_build_helpers2 ║ prerelease  ║ 0.1.0-prerelease.2 ║  Run Failed   ║
║                      ║    main     ║ -                  ║ Not published ║
╬══════════════════════╬═════════════╬════════════════════╬═══════════════╬

Status types include:

  • Run Failed: The build encountered an error and did not complete successfully.
  • Published: The build was successfully published.
  • Publishing: The build is currently in the process of being published.
  • Waiting for Queue: The build is waiting in the queue to be processed.
  • Not Published: The build has not been published.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • NukeBuild for providing the foundation for this project.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
6.3.29 304 11/25/2024
6.3.28 590 11/22/2024
6.3.26 37 11/22/2024
6.3.25 997 11/19/2024
6.3.24 350 11/14/2024
6.3.22 32 11/14/2024
6.3.21 94 11/13/2024
6.3.20 543 11/7/2024
6.3.19 205 11/6/2024
6.3.18 3,421 10/30/2024
6.3.17 547 10/30/2024
6.3.16-prerelease.2 31 10/30/2024
6.3.15 332 10/29/2024
6.3.14 538 10/26/2024
6.3.13 405 10/25/2024
6.3.11 1,055 10/23/2024
6.3.10 417 10/22/2024
6.3.8 43 10/22/2024
6.3.7 887 10/17/2024
6.3.6 191 10/17/2024
6.3.5 717 10/14/2024
6.3.4 245 10/14/2024
6.3.3 685 10/11/2024
6.3.2 107 10/11/2024
6.3.1 38 10/11/2024
6.3.0-prerelease.2 29 10/11/2024
6.2.1 1,112 10/7/2024
6.2.0 673 10/4/2024
6.1.4 452 10/2/2024
6.1.4-prerelease.6 32 10/4/2024
6.1.4-prerelease.5 36 10/4/2024
6.1.3 741 9/27/2024
6.1.2 139 9/27/2024
6.1.1 41 9/27/2024
6.1.0 1,118 9/25/2024
6.0.2 793 9/23/2024
6.0.1 681 9/20/2024
6.0.0 766 9/18/2024
6.0.0-prerelease.4 34 9/18/2024
6.0.0-prerelease.2 35 9/18/2024
6.0.0-prerelease.1 33 9/18/2024
5.1.5 441 9/16/2024
5.1.4 716 9/10/2024
5.1.3 79 9/10/2024
5.1.2 799 9/5/2024
5.1.1 521 9/2/2024
5.1.0 380 8/29/2024
5.0.2 901 8/26/2024
5.0.0 53 8/26/2024
5.0.0-prerelease.13 41 8/26/2024
5.0.0-prerelease.12 35 8/26/2024
5.0.0-prerelease.11 37 8/26/2024
5.0.0-prerelease.10 40 8/26/2024
4.11.0 47 8/26/2024
4.10.4 460 8/22/2024
4.10.3 471 8/20/2024
4.10.2 312 8/19/2024
4.10.1 519 8/14/2024
4.10.0 307 8/14/2024
4.10.0-prerelease.9 36 8/14/2024
4.10.0-prerelease.8 36 8/14/2024
4.10.0-prerelease.7 46 8/14/2024
4.10.0-prerelease.6 38 8/14/2024
4.10.0-prerelease.5 37 8/14/2024
4.10.0-prerelease.4 40 8/13/2024
4.10.0-prerelease.3 36 8/13/2024
4.10.0-prerelease.2 39 8/13/2024
4.10.0-prerelease.1 36 8/13/2024
4.9.6 207 8/13/2024
4.9.5 427 8/13/2024
4.9.5-prerelease.6 40 8/13/2024
4.9.4 60 8/13/2024
4.9.4-prerelease.6 41 8/6/2024
4.9.4-prerelease.5 45 8/5/2024
4.9.4-prerelease.3 34 8/5/2024
4.9.4-prerelease.2 31 8/5/2024
4.9.4-prerelease.1 31 8/5/2024
4.9.3 561 7/31/2024
4.9.2 126 7/31/2024
4.9.1 33 7/31/2024
4.9.0 34 7/31/2024
4.8.0 424 7/26/2024
4.6.5 866 7/16/2024
4.6.4 50 7/16/2024
4.6.3 49 7/16/2024
4.6.2 46 7/16/2024
4.6.0 45 7/16/2024
4.5.8 161 7/15/2024
4.5.7 208 7/14/2024
4.5.4 50 7/14/2024
4.5.3 49 7/14/2024
4.5.2 52 7/14/2024
4.5.1 56 7/14/2024
4.5.0 61 7/13/2024
4.4.0 59 7/13/2024
4.3.1 194 7/13/2024
4.3.0 46 7/13/2024
4.2.1 562 7/12/2024
4.2.0-prerelease.9 44 7/12/2024
4.2.0-prerelease.4 46 7/12/2024
4.2.0-prerelease.3 40 7/12/2024
4.2.0-prerelease.1 41 7/12/2024
4.1.0 46 7/12/2024
4.0.6 363 7/9/2024
4.0.5 46 7/9/2024
4.0.4 755 7/7/2024
4.0.3 46 7/7/2024
4.0.2 54 7/7/2024
4.0.1 224 7/7/2024
4.0.0 193 7/7/2024
4.0.0-prerelease.4 44 7/7/2024
4.0.0-prerelease.2 40 7/7/2024
4.0.0-prerelease.1 44 7/7/2024
3.3.5 52 7/6/2024
3.3.4 246 7/1/2024
3.3.3 199 6/30/2024
3.3.2 48 6/30/2024
3.3.1 54 6/30/2024
3.3.0 49 6/30/2024
3.3.0-prerelease.12 42 6/30/2024
3.2.5 166 6/30/2024
3.2.4 59 6/30/2024
3.2.1 51 6/29/2024
3.2.0 300 6/27/2024
3.1.2 48 6/27/2024
3.0.5 124 6/26/2024
3.0.3 51 6/26/2024
3.0.0 64 6/26/2024
3.0.0-prerelease.3 43 6/26/2024
3.0.0-prerelease.2 47 6/26/2024
3.0.0-prerelease.1 46 6/26/2024
2.7.1 74 6/7/2024
2.7.0 48 6/7/2024
2.7.0-prerelease.1 45 6/7/2024
2.6.1 213 6/4/2024
2.6.1-prerelease.1 47 6/4/2024
2.6.0 127 6/4/2024
2.6.0-prerelease.1 41 6/4/2024
2.5.0 115 6/3/2024
2.5.0-prerelease.4 53 6/3/2024
2.5.0-prerelease.3 34 6/3/2024
2.5.0-prerelease.2 43 6/3/2024
2.5.0-prerelease.1 48 6/3/2024
2.4.1 69 5/29/2024
2.4.0 83 5/29/2024
2.4.0-prerelease.2 50 5/29/2024
2.4.0-prerelease.1 48 5/27/2024
2.3.0 185 5/27/2024
2.3.0-prerelease.1 48 5/27/2024
2.2.0 52 5/27/2024
2.2.0-prerelease.1 48 5/27/2024
2.1.2 100 5/27/2024
2.1.1 56 5/27/2024
2.1.0 179 5/24/2024
2.1.0-prerelease.4 53 5/24/2024
2.1.0-prerelease.3 56 5/24/2024
2.1.0-prerelease.2 42 5/23/2024
2.1.0-prerelease.1 45 5/23/2024
2.0.0 64 5/23/2024
2.0.0-prerelease.8 101 5/22/2024
2.0.0-prerelease.7 59 5/22/2024
2.0.0-prerelease.5 50 5/22/2024
2.0.0-prerelease.4 51 5/22/2024
2.0.0-prerelease.3 52 5/22/2024
1.0.2 548 4/25/2024
1.0.1 607 4/20/2024
1.0.0 424 4/1/2024
0.8.4-prerelease.4 78 3/31/2024
0.8.4-prerelease.2 66 3/31/2024
0.8.4-prerelease.1 54 3/31/2024
0.8.3 172 3/26/2024
0.8.3-prerelease.1 52 3/26/2024
0.8.2 151 3/26/2024
0.8.2-prerelease.2 60 3/26/2024
0.8.2-prerelease.1 57 3/26/2024
0.8.1 163 3/25/2024
0.8.1-prerelease.3 54 3/25/2024
0.8.1-prerelease.1 54 3/25/2024
0.8.0 112 3/25/2024
0.8.0-prerelease.44 60 3/25/2024
0.8.0-prerelease.40 63 3/25/2024
0.8.0-prerelease.39 59 3/25/2024
0.8.0-prerelease.38 59 3/25/2024
0.8.0-prerelease.37 53 3/25/2024
0.8.0-prerelease.36 184 3/22/2024
0.8.0-prerelease.35 59 3/22/2024
0.8.0-prerelease.34 141 3/21/2024
0.8.0-prerelease.33 50 3/21/2024
0.8.0-prerelease.32 63 3/21/2024
0.8.0-prerelease.31 57 3/21/2024
0.8.0-prerelease.28 66 3/21/2024
0.8.0-prerelease.27 60 3/21/2024
0.8.0-prerelease.26 52 3/21/2024
0.8.0-prerelease.25 54 3/21/2024
0.8.0-prerelease.23 53 3/21/2024
0.8.0-prerelease.22 54 3/21/2024
0.8.0-prerelease.21 59 3/21/2024
0.8.0-prerelease.20 49 3/21/2024
0.8.0-prerelease.19 52 3/21/2024
0.8.0-prerelease.18 58 3/21/2024
0.8.0-prerelease.17 55 3/21/2024
0.8.0-prerelease.16 61 3/21/2024
0.8.0-prerelease.15 58 3/21/2024
0.8.0-prerelease.14 51 3/21/2024
0.8.0-prerelease.13 52 3/21/2024
0.8.0-prerelease.12 55 3/21/2024
0.8.0-prerelease.11 49 3/21/2024
0.8.0-prerelease.10 58 3/21/2024
0.8.0-prerelease.9 58 3/21/2024
0.8.0-prerelease.7 325 3/19/2024
0.8.0-prerelease.6 117 3/19/2024
0.8.0-prerelease.5 275 3/13/2024
0.8.0-prerelease.4 64 3/13/2024
0.8.0-prerelease.3 50 3/13/2024
0.8.0-prerelease.2 66 3/13/2024
0.8.0-prerelease.1 49 3/13/2024
0.7.0 131 3/13/2024
0.7.0-prerelease.1 56 3/13/2024
0.6.0-prerelease.1 50 3/12/2024
0.5.0-prerelease.26 46 3/12/2024
0.5.0-prerelease.25 46 3/12/2024
0.5.0-prerelease.24 96 3/11/2024
0.5.0-prerelease.23 57 3/10/2024
0.5.0-prerelease.22 50 3/10/2024
0.5.0-prerelease.20 91 3/10/2024
0.5.0-prerelease.19 58 3/10/2024
0.5.0-prerelease.18 90 3/10/2024
0.5.0-prerelease.17 68 3/10/2024
0.5.0-prerelease.16 54 3/10/2024
0.5.0-prerelease.15 48 3/10/2024
0.5.0-prerelease.14 53 3/10/2024
0.5.0-prerelease.13 52 3/10/2024
0.5.0-prerelease.12 54 3/10/2024
0.5.0-prerelease.11 55 3/9/2024
0.5.0-prerelease.9 62 3/9/2024
0.5.0-prerelease.7 175 3/8/2024
0.5.0-prerelease.6 59 3/8/2024
0.5.0-prerelease.5 58 3/8/2024
0.5.0-prerelease.4 65 3/8/2024
0.4.2 98 3/8/2024
0.4.1 101 3/8/2024
0.4.0 89 3/8/2024
0.4.0-prerelease.46 57 3/8/2024
0.4.0-prerelease.45 34 3/8/2024
0.4.0-prerelease.44 48 3/8/2024
0.4.0-prerelease.42 58 3/8/2024
0.4.0-prerelease.41 51 3/7/2024
0.4.0-prerelease.39 47 3/7/2024
0.4.0-prerelease.37 46 3/7/2024
0.4.0-prerelease.36 48 3/7/2024
0.4.0-prerelease.35 46 3/7/2024
0.4.0-prerelease.34 52 3/7/2024
0.4.0-prerelease.33 50 3/7/2024
0.4.0-prerelease.32 51 3/7/2024
0.4.0-prerelease.28 53 3/7/2024
0.4.0-prerelease.27 44 3/7/2024
0.4.0-prerelease.25 48 3/7/2024
0.4.0-prerelease.24 47 3/7/2024
0.4.0-prerelease.23 50 3/7/2024
0.4.0-prerelease.22 50 3/7/2024
0.4.0-prerelease.21 56 3/7/2024
0.4.0-prerelease.20 51 3/7/2024
0.4.0-prerelease.19 50 3/7/2024
0.4.0-prerelease.18 52 3/7/2024
0.4.0-prerelease.17 56 3/7/2024
0.4.0-prerelease.16 50 3/7/2024
0.4.0-prerelease.15 50 3/7/2024
0.4.0-prerelease.14 53 3/7/2024
0.4.0-prerelease.13 53 3/7/2024
0.3.0 117 3/5/2024
0.3.0-prerelease.3 59 3/5/2024
0.2.0 113 3/5/2024
0.1.0 124 3/5/2024
0.1.0-prerelease.22 56 3/5/2024
0.1.0-prerelease.19 49 3/5/2024
0.1.0-prerelease.18 52 3/5/2024
0.1.0-prerelease.17 53 3/5/2024
0.1.0-prerelease.13 61 3/5/2024
0.1.0-prerelease.12 63 3/5/2024
0.1.0-prerelease.10 61 3/5/2024
0.1.0-prerelease.9 60 3/5/2024
0.1.0-prerelease.8 57 3/5/2024
0.1.0-prerelease.7 59 3/5/2024
0.1.0-prerelease.5 60 3/5/2024
0.1.0-prerelease.4 51 3/5/2024
0.1.0-prerelease.3 58 3/5/2024
0.1.0-prerelease.2 56 3/5/2024
0.1.0-prerelease.1 143 12/13/2023
0.1.0-alpha.1 66 3/5/2024

## What's Changed
* Added caching to every entry by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/44


**Full Changelog**: https://github.com/Kiryuumaru/NukeBuildHelpers/compare/build.364...build.365