I managed to have my pipeline triggered when I push a tag to the repo. The tag is always is the format "v(Major).(Minor).(Release)(-alpha)".
How can I get that information from the tag and set is as the package version?
EDIT 1:
The command git tag -a 1.0.1
will create the tag that will trigger the pipeline and I want the nugget package version to be "1.0.1" like the tag