ModularPipelines.GitHub 3.0.1

Prefix Reserved
dotnet add package ModularPipelines.GitHub --version 3.0.1
                    
NuGet\Install-Package ModularPipelines.GitHub -Version 3.0.1
                    
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="ModularPipelines.GitHub" Version="3.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ModularPipelines.GitHub" Version="3.0.1" />
                    
Directory.Packages.props
<PackageReference Include="ModularPipelines.GitHub" />
                    
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 ModularPipelines.GitHub --version 3.0.1
                    
#r "nuget: ModularPipelines.GitHub, 3.0.1"
                    
#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.
#:package ModularPipelines.GitHub@3.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ModularPipelines.GitHub&version=3.0.1
                    
Install as a Cake Addin
#tool nuget:?package=ModularPipelines.GitHub&version=3.0.1
                    
Install as a Cake Tool

ModularPipelines

Write CI/CD pipelines in C#. Debug them locally. Ship with confidence.

nuget

Nuget GitHub Workflow Status (with event) GitHub last commit (branch) Codacy Badge CodeFactor License Codacy Badge codecov

The Problem with YAML Pipelines

You know the drill. You write some YAML, push it, wait for CI to start, watch it fail on a typo, fix it, push again, wait again. Repeat until you lose the will to live.

YAML pipelines are:

  • Impossible to debug locally - "Works on my machine" but fails mysteriously in CI
  • No compile-time safety - Typos in variable names? Enjoy your 10-minute feedback loop
  • Copy-paste hell - Reusing logic means duplicating YAML and hoping you update all the copies
  • Vendor lock-in - Switching from GitHub Actions to Azure Pipelines? Rewrite everything

The Solution

ModularPipelines lets you write your CI/CD pipelines as regular C# code. That means:

Set a breakpoint. Step through your pipeline. Fix it before you push.

[DependsOn<BuildModule>]
[DependsOn<TestModule>]
public class PublishModule : Module<CommandResult>
{
    protected override async Task<CommandResult?> ExecuteAsync(IPipelineContext context, CancellationToken cancellationToken)
    {
        // This is real C#. Set a breakpoint. Inspect variables. Debug locally.
        return await context.DotNet().Publish(new DotNetPublishOptions
        {
            Project = "src/MyApp/MyApp.csproj",
            Configuration = Configuration.Release,
            Output = "publish/"
        }, cancellationToken);
    }
}

Why Developers Choose ModularPipelines

Your IDE Actually Helps You

Intellisense, refactoring, compile-time errors. Your pipeline code gets the same treatment as your application code. Rename a module? Your IDE updates all the references. Typo in an option? Red squiggle before you even save.

Run Locally, Push Confidently

Test your entire pipeline on your machine before pushing. No more "let me push and see if it works" commits. Debug failures in your IDE instead of reading logs from a build agent.

Automatic Parallelization

Modules declare their dependencies with attributes. ModularPipelines figures out what can run in parallel and maximizes throughput. No more manually orchestrating parallel jobs.

Switch Build Systems Without Rewriting

Your pipeline logic lives in C#, not in vendor-specific YAML. Moving from GitHub Actions to Azure Pipelines to TeamCity? Change one line - your modules stay the same.

Full Dependency Injection

Inject services, configuration, and secrets the same way you do in ASP.NET Core. Mock dependencies for testing. No more environment variable gymnastics.

Secrets Stay Secret

Secrets are automatically obfuscated in logs. No more accidentally exposing API keys in build output.

Modules Share Data

Modules return strongly-typed results that other modules can consume. No shared mutable state - just clean data flow.

// BuildModule returns version info
public class BuildModule : Module<BuildInfo>
{
    protected override async Task<BuildInfo?> ExecuteAsync(IModuleContext context, CancellationToken cancellationToken)
    {
        await context.DotNet().Build(new DotNetBuildOptions { Project = "MyApp.csproj" }, cancellationToken);
        return new BuildInfo { Version = "1.0.0", OutputPath = "bin/Release" };
    }
}

// PublishModule retrieves and uses it
[DependsOn<BuildModule>]
public class PublishModule : Module
{
    protected override async Task ExecuteAsync(IModuleContext context, CancellationToken cancellationToken)
    {
        var buildResult = await GetModule<BuildModule>();
        var outputPath = buildResult.Value!.OutputPath; // Strongly-typed, compile-time checked
        // Publish using the build output...
    }
}

Catch Mistakes at Compile Time

Built-in Roslyn analyzers catch common mistakes before you even run:

  • Missing [DependsOn] when calling GetModule<T>()
  • Circular dependencies between modules
  • Forgetting to await module results
  • Using Console.Write instead of the logging system

Full Documentation

Quick Start

dotnet new console -n MyPipeline
cd MyPipeline
dotnet add package ModularPipelines
// Program.cs
await PipelineHostBuilder.Create()
    .AddModule<BuildModule>()
    .AddModule<TestModule>()
    .AddModule<PublishModule>()
    .ExecutePipelineAsync();
// BuildModule.cs
public class BuildModule : Module<CommandResult>
{
    protected override async Task<CommandResult?> ExecuteAsync(IPipelineContext context, CancellationToken cancellationToken)
    {
        return await context.DotNet().Build(new DotNetBuildOptions
        {
            Project = "MySolution.sln",
            Configuration = Configuration.Release
        }, cancellationToken);
    }
}
// TestModule.cs
[DependsOn<BuildModule>]
public class TestModule : Module<CommandResult>
{
    protected override async Task<CommandResult?> ExecuteAsync(IPipelineContext context, CancellationToken cancellationToken)
    {
        return await context.DotNet().Test(new DotNetTestOptions
        {
            Project = "MySolution.sln",
            Configuration = Configuration.Release
        }, cancellationToken);
    }
}

Run it:

dotnet run

That's it. No YAML. No waiting for CI. Just dotnet run and watch your pipeline execute.

Console Progress

See exactly what's happening as your pipeline runs:

image

Results

Get a clear summary when your pipeline completes:

<img width="444" alt="image" src="https://github.com/thomhurst/ModularPipelines/assets/30480171/8963e891-2c29-4382-9a3e-6ced4daf4d4b">

Integrations

ModularPipelines has strongly-typed wrappers for the tools you already use:

Package Description Version
ModularPipelines Write your pipelines in C#! nuget
ModularPipelines.AmazonWebServices Helpers for interacting with Amazon Web Services. nuget
ModularPipelines.Azure Helpers for interacting with Azure. nuget
ModularPipelines.Azure.Pipelines Helpers for interacting with Azure Pipeline agents. nuget
ModularPipelines.Chocolatey Helpers for interacting with the Chocolatey CLI. nuget
ModularPipelines.Cmd Helpers for interacting with the Windows cmd process. nuget
ModularPipelines.Docker Helpers for interacting with the Docker CLI. nuget
ModularPipelines.DotNet Helpers for interacting with dotnet CLI. nuget
ModularPipelines.Email Helpers for sending emails. nuget
ModularPipelines.Ftp Helpers for downloading and uploading via FTP. nuget
ModularPipelines.Yarn Helpers for interacting with Yarn CLI. nuget
ModularPipelines.Node Helpers for interacting with node / npm CLI. nuget
ModularPipelines.Git Helpers for interacting with git. nuget
ModularPipelines.GitHub Helpers for interacting with GitHub Actions build agents. nuget
ModularPipelines.Google Helpers for interacting with the Google gcloud CLI. nuget
ModularPipelines.Helm Helpers for interacting with Helm CLI. nuget
ModularPipelines.Kubernetes Helpers for interacting with kubectl CLI. nuget
ModularPipelines.MicrosoftTeams Helpers for sending Microsoft Teams cards. nuget
ModularPipelines.Slack Helpers for sending Slack cards. nuget
ModularPipelines.TeamCity Helpers for interacting with TeamCity build agents. nuget
ModularPipelines.Terraform Helpers for interacting with Terraform CLI. nuget
ModularPipelines.WinGet Helpers for interacting with the Windows Package Manager. nuget

How Does This Compare to Cake / Nuke?

ModularPipelines Cake Nuke
Language Real C# C# DSL (scripted) Real C#
Parallelization Automatic based on dependencies Manual Manual
Architecture Separate module classes (SRP) Single build script Single build class
Dependency Injection Full Microsoft.Extensions.DI Limited Built-in but different
Setup dotnet run Requires bootstrapper Requires global tool
Module Communication Strongly-typed return values Shared state Parameters

ModularPipelines takes a different approach: each unit of work is a self-contained module class. This keeps code organized, makes merge conflicts rare, and lets you test modules in isolation.

Features at a Glance

  • Parallel execution - Automatic based on declared dependencies
  • Module data sharing - Strongly-typed results flow between modules
  • Roslyn analyzers - Catch mistakes at compile time, not runtime
  • Conditional dependencies - DependsOnIf<T>() for dynamic dependency graphs
  • Dependency management - Circular dependency detection built-in
  • Strong typing - Pass data between modules with compile-time safety
  • Debug locally - Set breakpoints, inspect variables, fix issues before pushing
  • Build agent agnostic - Same code runs on GitHub, Azure, TeamCity, or your laptop
  • Secret obfuscation - Automatic masking in logs
  • Hooks - Run code before/after any module
  • Skip conditions - Dynamically skip modules based on custom logic
  • Retry policies - Configurable retry with Polly integration
  • Requirements validation - Check prerequisites before running
  • Progress reporting - Real-time console output with parallel execution visualization
  • Source controlled - Your pipeline is code, version it like code

Breaking Changes

While I aim to maintain stability, minor versions may include breaking changes. These will always be documented in release notes.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on ModularPipelines.GitHub:

Repository Stars
thomhurst/TUnit
A modern, fast and flexible .NET testing framework
Version Downloads Last Updated
3.0.1 0 1/17/2026
3.0.0 0 1/16/2026
2.48.531-alpha0001 0 1/16/2026
2.48.528-alpha0001 35 1/16/2026
2.48.517-alpha0003 28 1/16/2026
2.48.499-alpha0001 35 1/16/2026
2.48.496-alpha0001 29 1/16/2026
2.48.30 8,212 11/2/2025
2.48.29 144 11/2/2025
2.48.8 450 10/30/2025
2.47.8 9,306 8/10/2025
2.47.0 363 8/9/2025
2.46.1 263 8/8/2025
2.44.121 1,621 7/30/2025
2.44.45 3,043 5/25/2025
2.44.44 745 5/19/2025
2.43.0 10,811 2/24/2025
2.42.319 1,439 2/18/2025
2.42.246 6,578 1/19/2025
2.42.228 1,767 1/10/2025
2.42.226 223 1/9/2025
2.42.140 2,963 12/1/2024
2.42.134 199 11/30/2024
2.42.132 181 11/30/2024
2.42.115 12,799 11/17/2024
2.42.87 1,802 10/28/2024
2.42.67 3,733 9/29/2024
2.42.59 1,385 9/19/2024
2.42.54 257 9/19/2024
2.42.53 170 9/19/2024
2.42.47 1,010 9/13/2024
2.42.45 4,851 9/12/2024
2.42.9 1,083 9/5/2024
2.42.8 555 9/4/2024
2.42.0 219 9/4/2024
2.41.4 250 9/3/2024
2.41.0 329 9/3/2024
2.40.18 238 9/2/2024
2.40.15 180 9/2/2024
2.40.10 257 9/2/2024
2.40.8 153 9/2/2024
2.40.4 474 8/29/2024
2.40.1 269 8/28/2024
2.38.36 255 8/26/2024
2.38.25 426 8/12/2024
2.38.2 756 7/27/2024
2.38.1 188 7/27/2024
2.37.9 212 7/14/2024
2.36.29 189 7/5/2024
2.36.23 184 6/30/2024
2.36.4 177 6/7/2024
2.35.0 219 6/2/2024
2.34.0 198 5/23/2024
2.33.0 180 5/20/2024
2.32.0 221 5/17/2024
2.31.3 720 4/15/2024
2.31.0 153 4/15/2024
2.30.9 222 3/27/2024
2.30.5 191 3/26/2024
2.30.3 192 3/26/2024
2.29.32 174 3/26/2024
2.29.22 234 3/8/2024
2.29.15 203 3/1/2024
2.29.11 176 2/27/2024
2.29.9 188 2/26/2024
2.29.0 180 2/25/2024
2.28.0 171 2/23/2024
2.27.12 199 2/15/2024
2.27.9 185 2/14/2024
2.27.3 212 2/8/2024
2.27.0 193 2/8/2024
2.26.8 189 2/4/2024
2.26.0 183 1/29/2024
2.25.0 166 1/28/2024
2.24.9 191 1/25/2024
2.24.4 171 1/25/2024
2.24.1 188 1/22/2024
2.22.0 182 1/18/2024
2.21.12 186 1/18/2024
2.21.9 179 1/18/2024
2.21.4 181 1/13/2024
2.21.0 179 1/12/2024
2.20.2 225 1/11/2024
2.19.2 222 12/27/2023
2.19.0 173 12/26/2023
2.18.8 172 12/26/2023
2.18.0 180 12/24/2023
2.17.25 223 12/22/2023
2.17.20 190 12/5/2023
2.17.0 218 11/24/2023
2.16.2 172 11/23/2023
2.16.0 180 11/23/2023
2.15.24 180 11/22/2023
2.15.21 174 11/22/2023
2.15.17 158 11/20/2023
2.15.3 154 11/9/2023
2.15.0 153 11/8/2023
2.14.9 159 11/6/2023
2.14.7 154 11/6/2023
2.14.1 175 11/6/2023
2.13.63 179 10/29/2023
2.13.47 163 10/20/2023
2.13.8 178 10/13/2023
2.13.5 183 10/13/2023
2.12.15 178 10/10/2023
2.12.11 174 10/10/2023
2.12.5 246 10/6/2023
2.12.1 178 10/4/2023
2.11.12 195 10/1/2023
2.11.11 178 9/30/2023
2.11.9 172 9/30/2023
2.11.4 173 9/30/2023
2.11.0 183 9/29/2023
2.10.6 174 9/29/2023
2.10.0 166 9/28/2023
2.9.0 186 9/28/2023