Nuget Package Versioning using GIT Versions
Git Version is a library which helps to manage the versions of packages.
How To Manage Nugget Version.
There are various ways to manage versions depending on your CI/CD Pipeline. But here for **CM Connect **we will be using tags for generating nuget package.
It is necessary to create tag for publishing nuget package
Nuget packages can be publish into two ways.
- Release
- Pre-Release
Release Version
For creating a release version of nuget package follow the steps:
- Open the GitLab Repo
- From Left Menu Repository > Tags
- Click on New Tag
- Tag Name must be in the format
v1.0.0or should follow/^v[0-9]+\.[0-9]+\.[0-9]+$/regex pattern - Select the Branch as Main.
- Create Tag
**Warning: Branch should be Main Branch **and tag name must follow the pattern /^v[0-9]+\.[0-9]+\.[0-9]+$/
Pre-Release Version
For creating a pre-release version of nuget package follow the steps:
- Open the GitLab Repo
- From Left Menu Repository > Tags
- Click on New Tag
- Tag Name must be in the format
v1.0.0-alpha/v1.0.0-beta/v1.0.0-alpha1etc or should follow/^v[0-9]+\.[0-9]+\.[0-9]+\-.*/regex pattern - Select any Branch.
- Create Tag
Warning: TTag name must follow the patten /^v[0-9]+\.[0-9]+\.[0-9]+\-.*/