ricaun.Nuke 1.9.3

Prefix Reserved
dotnet add package ricaun.Nuke --version 1.9.3
                    
NuGet\Install-Package ricaun.Nuke -Version 1.9.3
                    
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="ricaun.Nuke" Version="1.9.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ricaun.Nuke" Version="1.9.3" />
                    
Directory.Packages.props
<PackageReference Include="ricaun.Nuke" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ricaun.Nuke --version 1.9.3
                    
#r "nuget: ricaun.Nuke, 1.9.3"
                    
#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.
#addin nuget:?package=ricaun.Nuke&version=1.9.3
                    
Install as a Cake Addin
#tool nuget:?package=ricaun.Nuke&version=1.9.3
                    
Install as a Cake Tool

ricaun.Nuke

This package is to simplify the build automation system using Nuke.Common.

Visual Studio 2022 Nuke License MIT Build Release

Examples

Build.cs - IPublish

using Nuke.Common;
using Nuke.Common.Execution;
using ricaun.Nuke;
using ricaun.Nuke.Components;

class Build : NukeBuild, IPublish
{
    // string IHazMainProject.MainName => "ProjectName";
    public static int Main() => Execute<Build>(x => x.From<IPublish>().Build);
}

Environment Variables

env:
    GitHubToken: ${{ secrets.GITHUB_TOKEN }}
    SignFile: ${{ secrets.SIGN_FILE }}
    SignPassword: ${{ secrets.SIGN_PASSWORD }}

Build.cs - IPublishPack

using Nuke.Common;
using Nuke.Common.Execution;
using ricaun.Nuke;
using ricaun.Nuke.Components;

class Build : NukeBuild, IPublishPack
{
    // string IHazMainProject.MainName => "ProjectName";
    public static int Main() => Execute<Build>(x => x.From<IPublishPack>().Build);
}

Environment Variables

Publish Github

env:
    GitHubToken: ${{ secrets.GITHUB_TOKEN }}

SignFile and SignPassword

env:
    GitHubToken: ${{ secrets.GITHUB_TOKEN }}
    SignFile: ${{ secrets.SIGN_FILE }}
    SignPassword: ${{ secrets.SIGN_PASSWORD }}

SignFile could be a file/url/Base64 to the certificate file. SignPassword is the password to the certificate file.

SignFile using Azure Key Vault

To simplify the configuration to sign with Azure Key Vault using the same environment variables are used SignFile and SignPassword.

env:
    GitHubToken: ${{ secrets.GITHUB_TOKEN }}
    SignFile: ${{ secrets.SIGN_FILE_AZURE }}
    SignPassword: ${{ secrets.SIGN_PASSWORD_AZURE }}
SIGN_FILE_AZURE

The SIGN_FILE_AZURE is a json with the base configuration of the certificated in the Azure Key Vault:

{
    "AzureKeyVaultCertificate": "AzureKeyVaultCertificate",
    "AzureKeyVaultUrl": "AzureKeyVaultUrl",
    "AzureKeyVaultClientId": "AzureKeyVaultClientId",
    "AzureKeyVaultTenantId": "AzureKeyVaultTenantId",
    "TimestampUrl" : "http://timestamp.digicert.com"
    "TimestampDigest" : "sha256"
}

The TimestampUrl and TimestampDigest are optional.

SIGN_PASSWORD_AZURE

The SIGN_PASSWORD_AZURE is the AzureKeyVaultClientSecret of the Azure Key Vault certificate.

Publish Package NuGet

env:
    GitHubToken: ${{ secrets.GITHUB_TOKEN }}
    SignFile: ${{ secrets.SIGN_FILE }}
    SignPassword: ${{ secrets.SIGN_PASSWORD }}
    NuGetApiUrl: ${{ secrets.NUGET_API_URL }}
    NuGetApiKey: ${{ secrets.NUGET_API_KEY }}

Build.cs - ITest

ITest runs all the TestLocalProjectName tests on local build and server build.

using Nuke.Common;
using Nuke.Common.Execution;
using ricaun.Nuke;
using ricaun.Nuke.Components;

class Build : NukeBuild, IPublish, ITest
{
    // bool ITest.TestBuildStopWhenFailed => true;
    // string ITest.TestProjectName => "*.Tests";
    public static int Main() => Execute<Build>(x => x.From<IPublish>().Build);
}

Build.cs - ITestLocal

ITestLocal runs all the TestLocalProjectName tests only on local build.

using Nuke.Common;
using Nuke.Common.Execution;
using ricaun.Nuke;
using ricaun.Nuke.Components;

class Build : NukeBuild, IPublish, ITestLocal
{
    // bool ITestLocal.TestLocalBuildStopWhenFailed => true;
    // string ITestLocal.TestLocalProjectName => "*.Tests";
    public static int Main() => Execute<Build>(x => x.From<IPublish>().Build);
}

Build.cs - ITestServer

ITestServer runs all the TestServerProjectName tests only on server build.

using Nuke.Common;
using Nuke.Common.Execution;
using ricaun.Nuke;
using ricaun.Nuke.Components;

class Build : NukeBuild, IPublish, ITestServer
{
    // bool ITestServer.TestServerBuildStopWhenFailed => true;
    // string ITestServer.TestServerProjectName => "*.Tests";
    public static int Main() => Execute<Build>(x => x.From<IPublish>().Build);
}

License

This package is licensed under the MIT License.


Do you like this package? Please star this project on GitHub!


Copyright © 2021 ricaun

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ricaun.Nuke:

Package Downloads
ricaun.Nuke.PackageBuilder

Nuke PackageBuilder for Autodesk Application.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.9.3 1,213 3/20/2025
1.9.2 979 1/19/2025
1.9.1 353 1/3/2025
1.9.0 277 12/19/2024
1.8.2 495 11/20/2024
1.8.1 1,377 5/15/2024
1.8.0 1,066 4/1/2024
1.7.4 305 3/11/2024
1.7.3 1,006 12/22/2023
1.7.2 697 11/19/2023
1.7.1 450 10/6/2023
1.7.0 222 10/4/2023
1.6.1 169 10/2/2023
1.6.0 155 10/2/2023
1.5.2 146 10/2/2023
1.5.1 650 7/24/2023
1.5.0 565 5/31/2023
1.4.4 697 3/30/2023
1.4.3 785 1/24/2023
1.4.2 367 12/21/2022
1.4.1 343 12/15/2022
1.4.0 974 10/9/2022
1.3.6 536 8/18/2022
1.3.5 888 8/13/2022
1.3.4 823 7/19/2022
1.3.3 649 7/18/2022
1.3.2 514 7/18/2022
1.3.1 899 6/15/2022
1.3.0 757 6/15/2022
1.2.2 1,564 4/22/2022
1.2.1 1,226 4/6/2022
1.2.0 822 4/4/2022
1.1.3 1,747 3/11/2022
1.1.2 1,324 2/23/2022
1.1.1 870 2/23/2022
1.1.0 916 2/15/2022
1.0.2 724 1/19/2022
1.0.1 880 1/19/2022
1.0.0 907 1/19/2022
0.0.16 780 1/11/2022
0.0.15 529 1/11/2022
0.0.14 489 1/4/2022
0.0.13 718 12/21/2021
0.0.12 521 12/21/2021
0.0.11 569 12/17/2021
0.0.10 563 12/17/2021
0.0.9 448 12/17/2021
0.0.8 488 12/17/2021
0.0.7 838 12/9/2021
0.0.6 552 12/9/2021
0.0.5 559 12/8/2021