NukeBuildHelpers 3.0.0-prerelease.1
See the version list below for details.
dotnet add package NukeBuildHelpers --version 3.0.0-prerelease.1
NuGet\Install-Package NukeBuildHelpers -Version 3.0.0-prerelease.1
<PackageReference Include="NukeBuildHelpers" Version="3.0.0-prerelease.1" />
paket add NukeBuildHelpers --version 3.0.0-prerelease.1
#r "nuget: NukeBuildHelpers, 3.0.0-prerelease.1"
// Install NukeBuildHelpers as a Cake Addin
#addin nuget:?package=NukeBuildHelpers&version=3.0.0-prerelease.1&prerelease
// Install NukeBuildHelpers as a Cake Tool
#tool nuget:?package=NukeBuildHelpers&version=3.0.0-prerelease.1&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:
- Clone the template repository.
- 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 | Versions 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. |
-
net8.0
- CliWrap (>= 3.6.6)
- Nuke.Common (>= 8.0.0)
- Semver (>= 2.3.0)
- Sharprompt (>= 2.4.5)
- YamlDotNet (>= 15.1.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
## What's Changed
* Test PR by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/1
* Test PR 2 by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/2
* Merge from prerelease by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/3
* Bump from prerelease by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/4
* Fixed versioning on build id by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/5
* Cleanups by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/6
* Fixed latest versioning logic by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/7
* Merge changes from prerelease by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/8
* Added azure workflow generator by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/9
* Cleanups by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/10
* Post cleanups for github actions by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/11
* Merged from prerelease by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/12
* Moved output dir by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/13
* Added `BuildId` to `NewVersion` by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/14
* Dynamic main branch by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/15
* Isolated `buidlid` to each environment by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/16
* Fixed buildId number by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/17
* Fixed first release status watcher incorrect status by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/18
* Changed default confirmation for bump to false by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/19
* Added skips for local commit bump indicator by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/20
* Fixed status watch env by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/21
* Added PR workflow by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/22
* Fixed deployments by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/23
* Added pr number to object context by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/25
* Added `bumpandforget` by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/26
* Fixed empty entries on pull requests by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/27
* Added env checker by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/28
* Fixed bump trigger on release by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/29
* Cleanups by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/30
* Changed `SecretHelperAttribute` to `SecretVariableAttribute` by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/31
* Cleanup dependencies by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/32
* Changed AppEntry default `MainRelease` indicator to false by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/33
* Changed Entry default `RunParallel` indicator to false by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/34
* Added auto-clean output directory every build by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/35
* Refactor impl by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/36
* Fixed invalid write on version message by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/38
* Added release on pull request feature by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/37
* Added cache feature by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/42
* Fixed batch run by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/43
* Added caching to every entry by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/44
* Added test build publish job validation by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/45
* Removed unnecessary jobs by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/46
* Bump xunit.runner.visualstudio from 2.4.5 to 2.8.1 by @dependabot in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/48
* Bump NuGet.Packaging from 6.9.1 to 6.10.0 by @dependabot in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/49
* Bump xunit from 2.4.2 to 2.8.1 by @dependabot in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/52
* Bump Microsoft.NET.Test.Sdk from 17.6.0 to 17.10.0 by @dependabot in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/50
* Bump coverlet.collector from 6.0.0 to 6.0.2 by @dependabot in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/47
* Bump YamlDotNet from 15.1.2 to 15.1.6 by @dependabot in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/51
* Added support for overridable runner by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/53
* Added xml documentation by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/54
* Added support for multi app entry on single versioning by @Kiryuumaru in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/56
## New Contributors
* @Kiryuumaru made their first contribution in https://github.com/Kiryuumaru/NukeBuildHelpers/pull/1
**Full Changelog**: https://github.com/Kiryuumaru/NukeBuildHelpers/commits/build.374