Versions are based on tags in the git repo. Add a tag on the format v[major].[minor].[patch] to a commit.
For a version one release you tag your main branch with v1.0.0, you can do so from the
GitHub-release, Visual studio or other git tool.
Not tagging a version will leave you with 0.0.[number of commits].
The build will calculate how many commits you are from the last version tag.
So you simply have to a add a commit to main and you will get a new version number,
with a patch number equals the number of commits you are from the tag.
Simply tag your Major/Minor releases and leave patch to
0. Don't forget the initial v
Example:
v2.1.0
If you add patch-tag (v2.1.17 for instance) yourself and then adds commits it will add the number of
commits from your last patch.
Doing this manually could cause mismatch in versioning if not handled with care.
Other branches but $(GitDefaultBranch) will create a pre-release package.
If you main branch is not
mainyou will have to define<GitDefaultBranch>default-branch</GitDefaultBranch>in youDirectory.Build.props-file.