Invex.StructuredText.GithubActions
0.4.0-rc.10
See the version list below for details.
dotnet add package Invex.StructuredText.GithubActions --version 0.4.0-rc.10
NuGet\Install-Package Invex.StructuredText.GithubActions -Version 0.4.0-rc.10
<PackageReference Include="Invex.StructuredText.GithubActions" Version="0.4.0-rc.10" />
<PackageVersion Include="Invex.StructuredText.GithubActions" Version="0.4.0-rc.10" />
<PackageReference Include="Invex.StructuredText.GithubActions" />
paket add Invex.StructuredText.GithubActions --version 0.4.0-rc.10
#r "nuget: Invex.StructuredText.GithubActions, 0.4.0-rc.10"
#:package Invex.StructuredText.GithubActions@0.4.0-rc.10
#addin nuget:?package=Invex.StructuredText.GithubActions&version=0.4.0-rc.10&prerelease
#tool nuget:?package=Invex.StructuredText.GithubActions&version=0.4.0-rc.10&prerelease
Invex.StructuredText
A strongly-typed C# library for generating structured YAML text files, specifically GitHub Actions workflows, Dependabot configurations, and Azure DevOps Pipelines, using a fluent, type-safe API with a powerful expression system.
Features
Type-safe workflow authoring
Define CI/CD pipelines as C# objects with full IntelliSense and compile-time validation
Unified expression system
Build complex expressions (conditions, string interpolation, functions) that compile to platform-specific syntax
GitHub Actions
Full support for workflow YAML generation including triggers, jobs, steps, matrix strategies, permissions, concurrency, containers, and more
Dependabot
Generate dependabot.yml configurations with registries, update rules, groups, and schedules
Azure DevOps Pipelines
Comprehensive pipeline generation with stages, jobs, deployment strategies (runOnce, rolling, canary), resources, templates, and parameters
Packages
| Package | Description |
|---|---|
Invex.StructuredText |
Core library with StructuredTextWriter and the expression system |
Invex.StructuredText.GithubActions |
GitHub Actions workflow and Dependabot config generation |
Invex.StructuredText.AzureDevopsPipelines |
Azure DevOps Pipelines YAML generation |
Installation
dotnet add package Invex.StructuredText.GithubActions
# or
dotnet add package Invex.StructuredText.AzureDevopsPipelines
Both platform packages depend on Invex.StructuredText core, so it will be installed automatically.
Documentation
Comprehensive guides live in the docs/ directory:
- Introduction — what this library is and why it exists
- Getting Started — install and generate your first file
- Expressions — the unified expression system
- GitHub Actions — workflow generation in depth
- Dependabot —
dependabot.ymlgeneration - Azure DevOps Pipelines — pipelines, stages, jobs, deployment strategies
- Architecture — how the pieces fit together
- FAQ
An auto-generated API reference is built with docfx from the XML documentation comments.
Quick Start
GitHub Actions
var workflow = new GithubAction
{
Name = "CI",
On =
[
new On.Push
{
Branches = ["main"],
BranchesIgnore = null,
Tags = null,
TagsIgnore = null,
Paths = null,
PathsIgnore = null,
},
],
Jobs =
[
new Job
{
Name = new RawExpression("build"),
RunsOn = new() { Labels = [new RawExpression("ubuntu-latest")] },
Steps =
[
new Step.UsesStep
{
Name = new RawExpression("Checkout"),
Uses = new RawExpression("actions/checkout@v4"),
},
new Step.RunStep
{
Name = new RawExpression("Build"),
Run = ["dotnet build --configuration Release"],
},
],
},
],
};
var writer = new GithubActionWriter();
writer.Write(workflow);
var yaml = writer.TextWriter.ToString();
Azure DevOps Pipelines
var pipeline = new DevopsPipeline.DevopsPipelineWithSteps
{
Trigger = new Trigger.BranchList { Branches = ["main"] },
Steps =
[
new Step.Script { ScriptContent = new RawExpression("echo Hello, world!") },
],
};
var writer = new DevopsPipelineWriter();
writer.Write(pipeline);
var yaml = writer.TextWriter.ToString();
Expressions
The expression system provides a fluent API for building platform-specific expressions that are formatted differently
depending on the target (GitHub Actions uses ${{ }} syntax, Azure DevOps uses its own macro/runtime expression
syntax).
// Reference step outputs
var output = new StepOutputExpression
{
StepName = "build-step",
OutputName = "artifact-path",
};
// Use conditions
var condition = output.Contains("release").Evaluate();
// String interpolation with format expressions
var formatted = TextExpressions.Format($"Release-{output}");
// Logic operators
var combined = output.Contains("main") & new BooleanExpression(true);
Architecture
Core (Invex.StructuredText)
StructuredTextWriter: A low-level indentation-aware text writer that handles YAML-style output with automatic indent management viaIDisposablescopes- Expression System: A rich set of record types (
TextExpressionhierarchy) representing values, functions, logic operators, and workflow-specific constructs (step outputs, job outcomes, etc.) TextExpressionFormatter: Base class for platform-specific expression formatters
GitHub Actions (Invex.StructuredText.GithubActions)
GithubActionWriter: Serializes aGithubActionmodel to valid workflow YAMLDependabotConfigWriter: Serializes aDependabotConfigmodel to validdependabot.ymlGithubExpressionFormatter: Formats expressions using GitHub's${{ }}syntax- Model types: Strongly-typed records for all GitHub Actions concepts (triggers, jobs, steps, matrix, permissions, etc.)
Azure DevOps Pipelines (Invex.StructuredText.AzureDevopsPipelines)
DevopsPipelineWriter: Serializes aDevopsPipelinemodel to valid pipeline YAMLDevopsExpressionFormatter: Formats expressions using Azure DevOps syntax- Model types: Strongly-typed records/unions for pipelines, stages, jobs, steps, resources, triggers, variables, deployment strategies, and more
Requirements
- .NET 8.0, .NET 9.0, or .NET 10.0
License
This project is licensed under the MIT License.
| 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. net9.0 is compatible. 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 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. |
-
net10.0
- Dunet (>= 1.16.2)
- Invex.StructuredText (>= 0.4.0-rc.10)
- JetBrains.Annotations (>= 2025.2.4)
-
net8.0
- Dunet (>= 1.16.2)
- Invex.StructuredText (>= 0.4.0-rc.10)
- JetBrains.Annotations (>= 2025.2.4)
-
net9.0
- Dunet (>= 1.16.2)
- Invex.StructuredText (>= 0.4.0-rc.10)
- JetBrains.Annotations (>= 2025.2.4)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Invex.StructuredText.GithubActions:
| Package | Downloads |
|---|---|
|
Invex.Atom.Module.GithubWorkflows
An opinionated task and build automation framework |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0-rc.6 | 27 | 6/15/2026 |
| 1.1.0-rc.4 | 39 | 6/11/2026 |
| 1.1.0-rc.2 | 42 | 6/10/2026 |
| 1.0.0 | 860 | 6/10/2026 |
| 0.4.0-rc.10 | 43 | 6/10/2026 |
| 0.3.0 | 1,842 | 6/7/2026 |
| 0.3.0-rc.1 | 49 | 6/7/2026 |
| 0.2.0 | 82 | 6/6/2026 |
| 0.2.0-rc.3 | 59 | 6/6/2026 |
| 0.2.0-rc.1 | 48 | 6/6/2026 |
| 0.1.0 | 78 | 6/6/2026 |
| 0.1.0-rc.1 | 43 | 6/6/2026 |