Skip to content

Plugin: updater-nuget

Updates the version property inside a .csproj or other NuGet project file. It helps keep .NET package metadata in sync with SemRel releases.

Terminal window
semrel plugin install @semrel/updater-nuget

semrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.

Pre-built, signed multi-platform images (linux/amd64, linux/arm64) are published on every release:

Terminal window
docker pull ghcr.io/semrels/updater-nuget:latest

Verify the image signature with cosign:

Terminal window
cosign verify ghcr.io/semrels/updater-nuget:latest \
--certificate-identity-regexp 'https://github.com/SemRels/updater-nuget/.github/workflows/release.yml.*' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
version: 1
plugins:
- uses: @semrel/updater-nuget
args:
file: src/App/App.csproj
property: Version
NameRequiredDefaultDescription
SEMREL_PLUGIN_FILEno*.csprojProject file or glob to update.
SEMREL_PLUGIN_PROPERTYnoVersionXML property that stores the package version.
  • SEMREL_NEXT_VERSION
  • SEMREL_CURRENT_VERSION
  • SEMREL_TAG_NAME
  • SEMREL_DRY_RUN

For a 1.4.0 release, the updater can change <Version>1.3.2</Version> to <Version>1.4.0</Version>.