-
Notifications
You must be signed in to change notification settings - Fork 12
Publishing Guidelines
TrueLayer.NET uses MinVer to semantically version the library based on Git commits. The MinVer GitHub Page details how versions are calculated, but in short if a commit is tagged, the tag is used as the version, otherwise the height since the last tag is added as a pre-release version:
Example:
MinVer: Using { Commit: 7a08ea5, Tag: '0.0.3', Version: 0.0.3, Height: 12 }.
MinVer: Calculated version 0.0.4-alpha.0.12.
When PRs are merged to main
a pre-release version will be calculated automatically. The Publish
GitHub Actions workflow will push the pre-release NuGet package to GitHub Packages.
To release a new stable version you just need to tag the commit, for example:
git tag -a "1.0.0" -m "Version 1.0.0"
A tagged commit will result in the NuGet package being deployed to the official NuGet repository.
You can obtain the current version of main
by pulling down the latest changes and running the build script. The current version will be output during the Build task:
========================================
Build
========================================
Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
All projects are up-to-date for restore.
MinVer: Using { Commit: 1081059, Tag: '0.1.0-beta.1', Version: 0.1.0-beta.1, Height: 7 }.
MinVer: Calculated version 0.1.0-beta.1.7.
MinVer: Using { Commit: 1081059, Tag: '0.1.0-beta.1', Version: 0.1.0-beta.1, Height: 7 }.
MinVer: Calculated version 0.1.0-beta.1.7.
...