brandedoutcast / publish-nuget

📦 GitHub action to automate publishing NuGet packages when project version changes
https://github.com/marketplace/actions/publish-nuget
MIT License
197 stars 101 forks source link

[Bug] Using VersionPrefix-VersionSuffix for Version always considers as new #36

Closed Gigas002 closed 4 years ago

Gigas002 commented 4 years ago

I'm using VersionPrefix and VersionSuffix for my Version in .csproj. It looks like this:

<VersionPrefix>2.0.0</VersionPrefix>
<VersionSuffix>ci303</VersionSuffix>
<Version>$(VersionPrefix)-$(VersionSuffix)</Version>
<!--<Version>2.0.0-ci303</Version>-->

On my nuget page I already have version 2.0.0-ci303 published, but extension thinks it's a new version and tries to publish package (which, obviously, fails). I used <Version>2.0.0-ci303</Version> before and it worked as it should, so I guess the issue is about VersionPrefix and VersionSuffix only.

I also tried to set Version back to 2.0.0-ci303 this way:

<!--<Version>$(VersionPrefix)-$(VersionSuffix)</Version>-->
<Version>2.0.0-ci303</Version>

But it also breaks CD the same way. I suppose, comments should not be proceeded by default?