github-nuget-demo 1.3.4

dotnet add package github-nuget-demo --version 1.3.4
                    
NuGet\Install-Package github-nuget-demo -Version 1.3.4
                    
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="github-nuget-demo" Version="1.3.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="github-nuget-demo" Version="1.3.4" />
                    
Directory.Packages.props
<PackageReference Include="github-nuget-demo" />
                    
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 github-nuget-demo --version 1.3.4
                    
#r "nuget: github-nuget-demo, 1.3.4"
                    
#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 github-nuget-demo@1.3.4
                    
#: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=github-nuget-demo&version=1.3.4
                    
Install as a Cake Addin
#tool nuget:?package=github-nuget-demo&version=1.3.4
                    
Install as a Cake Tool

Github nuget demo

A demo of automatic publishing of a C# NuGet library to:

  • GitHub Packages
  • nuget.org

complete with automatic release notes from semantic commits (blog post), and automatic version bumping from commit message "bumps".

Setup

nuget.org publishing uses trusted publishing (GitHub OIDC), so there is no long-lived API key to manage.

To use this template for your own project:

  1. On nuget.org, open your username menu → Trusted Publishing and add a GitHub Actions policy with your repo owner, repo name, and workflow file release.yml.
  2. Add a repository secret (Settings → Secrets → Actions):
Secret Description
NUGET_USER Your nuget.org username (profile name, not email)

The GITHUB_TOKEN for GitHub Packages is provided automatically.

Why both registries?

GitHub Packages requires authentication even for public packages, making it impractical for public distribution. nuget.org allows anonymous access, so consumers can simply run:

dotnet add package GithubNugetDemo

Automatic Releasing

Every commit to main triggers a build & test.

If there are release-worthy changes (commits with feat:, fix:, etc.), a release is created:

  1. Version calculation (via git-cliff)
  2. NuGet package creation
  3. Git tag creation
  4. GitHub Release with changelog
  5. Push to GitHub Packages
  6. Push to nuget.org

Commits with internal prefixes (ci:, refactor:, etc.) do not trigger a release.

If there are no release-worthy commits then no release is generated, unless a bump: footer forces one (see Version Bumping).

Target Frameworks

The library multi-targets (currently net8.0 to net11.0) so consumers on older runtimes can still use it. The test and example consumer projects target only the latest.

Example Consumer

example-consumer is a console app that installs the published package from nuget.org, to show it working from the consumer side.

Commit Messages

This project uses Conventional Commits format. Optionally include a scope in parentheses: feat(subsystem): add support for arrays.

Prefixes that appear in release notes

Prefix Description
feat: ✨ New features
fix: 🐛 Bug fixes
perf: ⚡ Performance improvements
doc: 📚 Documentation changes
style: 🎨 Code style/formatting

See cliff.toml for definitive list.

Internal prefixes (not shown in release notes)

These are recommended for consistency but won't appear in user-facing changelogs:

Prefix Description
refactor: Code restructuring without behaviour change
test: Adding or updating tests
ci: CI/CD pipeline changes
build: Build system changes
chore: Maintenance tasks

How it works

Release notes are generated from all commits since the last tag, regardless of whether they're on main, in branches, or merge commits. When committing, think about what you want in the release notes:

  • Use a release-note prefix (like feat: or fix:) when the change is meaningful to library users
  • Use an internal prefix (like refactor: or ci:) for changes that don't affect users
  • Non-semantic commit messages (e.g. "WIP", "typo fix", "cleanup") are also ignored

This means you can commit freely during development without worrying about polluting release notes.

Version Bumping

By default, each release increments the patch version (e.g. 0.0.1 → 0.0.2).

To bump minor or major versions, add a footer to your commit message:

feat: add new feature

bump: minor
feat: breaking change

bump: major

Any bump: footer, including bump: patch, forces a release even when there are no release-worthy commits, e.g. to ship dependency upgrades committed as chore:.

Local Commands

Preview release notes for the current version:

./release-notes.sh

Preview unreleased changes:

./release-notes.sh --preview

Upgrades

Run all upgrades:

./upgrades.sh

Or individually. Each script refuses to run with staged changes and commits its own result:

Script What it does Needs
upgrade-dotnet.sh Moves to the latest .NET SDK, retargets the test and example projects, adds the new framework to the library's targets, runs tests mise
upgrade-nugets.sh Upgrades NuGet dependencies, runs tests dotnet-outdated (installed if missing)
upgrade-actions.sh Bumps GitHub Actions in .github/workflows to the major version of their latest release gh

The dotnet and NuGet upgrade commits include a bump: patch footer so consumers get a release with the new dependencies. The actions upgrade only affects CI, so it does not trigger a release.

Product 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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.4 91 11/18/2026
1.3.3 89 11/18/2026
1.3.2 91 11/18/2026
1.3.0 161 4/17/2026
1.2.0 142 2/13/2026
1.1.2 142 2/13/2026
1.1.1 144 2/13/2026