Deploy your .NET projects with a single YAML file. No scripts. No ceremony. Just ship it.
Let's be honest: CI/CD pipelines are powerful, but they're also way too complicated for what most projects need. You want to push a NuGet package or create a GitHub Release with some binaries. That's it. But instead, you end up wrestling with YAML indentation, provider-specific syntax, environment variables, and a dozen moving parts.
Tools like Nuke are fantastic for complex scenarios, but they come with their own learning curve and boilerplate. Sometimes you just want to declare what you want to deploy and let something else figure out the how.
That's DotnetDeployer. Write a simple deployer.yaml, run the tool, and you're done.
DotnetDeployer handles the boring parts of deployment:
- NuGet packages: Pack and push all packable projects in your solution
- GitHub Releases: Build platform-specific packages (AppImage, DEB, RPM, EXE, DMG, MSIX, APK, AAB) and upload them as release assets
- GitHub Pages: Deploy WebAssembly apps directly to GitHub Pages
- Automatic versioning: Integrates with GitVersion out of the box
- CI-friendly: Outputs
##vso[build.updatebuildnumber]for Azure Pipelines (and similar patterns for other CI systems)
version: 1nuget:
enabled: truesource: https://api.nuget.org/v3/index.jsonapiKey:
from: secretkey: nuget_api_key# From source (self-deployment style)
dotnet run --project path/to/DotnetDeployer.Tool.csproj
# Or install as a global tool
dotnet tool install -g DotnetDeployer.Tool
dotnetdeployer secrets set nuget_api_key
dotnetdeployerThe tool will:
- Detect your solution
- Use GitVersion to determine the version
- Pack all packable projects
- Push to NuGet (or simulate with
--dry-run)
version: 1nuget:
enabled: truesource: https://api.nuget.org/v3/index.jsonapiKey:
from: secretkey: nuget_api_keygithub:
enabled: trueowner: YourGitHubUsernamerepo: YourRepotoken:
from: secretkey: github_tokenoutputDir: artifactspackages:
- project: src/MyApp.Desktop/MyApp.Desktop.csprojformats:
- type: appimagearch: [x64, arm64]
- type: debarch: [x64]
- type: exe-setuparch: [x64]
- type: dmgarch: [x64, arm64]githubPages:
enabled: trueowner: YourGitHubUsernamerepo: MyApp-Pagestoken:
from: secretkey: github_tokenproject: src/MyApp.Browser/MyApp.Browser.csproj| Option | Description |
|---|---|
--config, -c | Path to deployer.yaml (default: deployer.yaml) |
--dry-run, -n | Simulate deployment without making changes |
--release-version, -v | Override version for the release |
--package-only | Generate packages without publishing NuGet, GitHub Releases, or GitHub Pages |
--package-project | Select one github.packages[].project entry when the YAML has multiple package projects |
--package-target | Generate a target in <type>:<arch> form, e.g. exe-setup:x64; can be repeated |
--output-dir | Override the directory where generated packages are written |
Secrets are managed with a subcommand:
dotnetdeployer secrets set nuget_api_key
dotnetdeployer secrets check nuget_api_key
dotnetdeployer secrets delete nuget_api_keysecrets set stores values in the system keyring: Windows Credential Manager, macOS Keychain, or Linux Secret Service through secret-tool. A from: secret value still reads deployer.secrets.yaml first, then falls back to the keyring.
See Secret Management for the full keyring, Android signing, and CI guidance.
Generate only selected packages:
dotnetdeployer --package-only \
--package-project src/MyApp.Desktop/MyApp.Desktop.csproj \
--package-target exe-setup:x64 \
--package-target msix:x64 \
--output-dir artifacts/manual-buildDotnetDeployer can deploy itself. Here's how:
trigger:
- master
- mainvariables:
- group: api-keys
- name: Agent.Source.Git.ShallowFetchDepthvalue: 0pool:
vmImage: 'ubuntu-latest'steps:
- checkout: selffetchDepth: 0
- pwsh: dotnet run --project src/DotnetDeployer.Tool/DotnetDeployer.Tool.csproj -- --dry-rundisplayName: Dry run (PRs)condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))env:
NUGET_API_KEY: $(NugetApiKey)
- pwsh: dotnet run --project src/DotnetDeployer.Tool/DotnetDeployer.Tool.csprojdisplayName: Deploycondition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))env:
NUGET_API_KEY: $(NugetApiKey)The tool automatically outputs ##vso[build.updatebuildnumber] to set the build name to the detected version.
| Platform | Types |
|---|---|
| Linux | AppImage, DEB, RPM |
| Windows | EXE (self-extracting), EXE (setup wizard), MSIX |
| macOS | DMG |
| Android | APK, AAB |
Android packages (APK/AAB) can be release-signed. DotnetDeployer supports three keystore sources with an explicit, expanded YAML syntax.
android:
signing:
keystore:
from: filepath: ./android/release.keystorestorePassword:
from: secretkey: android_store_passkeyAlias: release-keykeyPassword:
from: secretkey: android_key_passandroid:
signing:
keystore:
from: envname: ANDROID_KEYSTORE_BASE64encoding: base64storePassword:
from: secretkey: android_store_passkeyAlias: release-keykeyPassword:
from: secretkey: android_key_passandroid:
signing:
keystore:
from: secretkey: android_keystore_base64encoding: base64storePassword:
from: secretkey: android_store_passkeyAlias: release-keykeyPassword:
from: secretkey: android_key_passStore these values with dotnetdeployer secrets set <key>, or use a deployer.secrets.yaml in the repo root (add it to .gitignore):
android_keystore_base64: <base64-encoded-keystore-content>android_store_pass: <store-password>android_key_pass: <key-password>base64 -w 0 < your-release.keystore| Property | from: file | from: env | from: secret |
|---|---|---|---|
path | ✅ Required | — | — |
name | — | ✅ Required | — |
key | — | — | ✅ Required |
encoding | — | base64 | base64 |
You can also configure signing per package format instead of at the top level:
github:
packages:
- project: src/MyApp.Android/MyApp.Android.csprojformats:
- type: apksigning:
keystore:
from: envname: ANDROID_KEYSTORE_BASE64encoding: base64storePassword:
from: secretkey: android_store_passkeyAlias: release-keykeyPassword:
from: secretkey: android_key_pass