How to increase nuget package version automatically with Github Actions

Why do you need to increase the version of the nuget package? When you push a new nuget package to nuget.org, you need to increase the version of the package. Otherwise, you will get an error. I will show you how to do it automatically with Github Actions. As an example, I will use my nuget package MaximGorbatyuk.DatabaseSqlEndpoints. TL;DR You need github.run_number variable to increase the version, The release.yml file as example for you, Code example - MaximGorbatyuk....

February 3, 2023 · 4 min · Maxim Gorbatyuk