Shared GitHub Actions workflows and build scripts for SenDevGmbH projects.
This repository provides reusable GitHub Actions workflows and a Cake build script for building, testing, and publishing NuGet packages.
build.cs— Cake.Sdk build script (file-based C# app) that handles cleaning, packing, testing, and pushing NuGet packages..github/workflows/publish.yml— Reusable GitHub Actions workflow for publishing packages to NuGet.
Reference the publish.yml workflow from your repository:
jobs:
publish:
uses: SenDevGmbH/github-workflows/.github/workflows/publish.yml@main
with:
solution-path: 'src/MyProject.sln'
package-name-pattern: 'MyOrg.MyPackage'
test-project-path: 'src/MyProject.Tests/MyProject.Tests.csproj' # optional
secrets: inherit| Name | Required | Default | Description |
|---|---|---|---|
solution-path |
Yes | — | Path to the solution file |
package-name-pattern |
Yes | — | Base NuGet package name (e.g. Acme.MyLibrary) |
test-project-path |
No | '' |
Path to the test project (leave empty to skip tests) |
dotnet-version |
No | 9.0.x |
.NET SDK version to install |
Packages are built with Source Link enabled:
ContinuousIntegrationBuild=true— deterministic builds with normalized source pathsPublishRepositoryUrl=true— the repository URL is recorded in the package and PDBEmbedUntrackedSources=true— generated/untracked source files are embedded in the PDBDebugType=embedded— the PDB is embedded in the assembly, so symbols ship inside the package itself and work with any feed (nuget.org and Azure Artifacts alike, no.snupkgor symbol server required)
Consumers can step into package source code in Visual Studio or Rider — the debugger fetches the sources from GitHub at the exact commit the package was built from (disable Just My Code and keep Source Link support enabled).
| Name | Description |
|---|---|
NUGET_API_KEY |
API key for nuget.org |
AZURE_NUGET_KEY |
API key for the Azure Artifacts feed |
AZURE_NUGET_SOURCE |
URL of the Azure Artifacts NuGet feed |