As an example, please see the repositry:
1. Firstly, create a new NuGet package on nuget.org. To do that, you need to upload the first version of your library manually.
2. Go to
nuget.org/account/apikeys and create an API key for the NuGet package.
3. Go to the Secrets section in your repository settings and create a secret called
NUGET_API_KEY with the value of the API key.
4. Add the following
GitVersion.yml file to the root of the repository.
NOTE: You can adjust tag and mode depends on your needs.
5. Add the following build.yml file to the repository. It must be placed in
NOTE: Do not forget to change
YOUR_PROJECT_NAMEto the actual name of your project.
NOTE: You can adjust different parameters depends on your needs, for example, paths.
6. Now, when you push a new version of your library to the repository it is going to be built, packed, and pushed to nuget.org with a proper version, for example, 1.0.5.