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

[FEATURE] Failing if a nuget package with same version already exists #43

Open AnmolSinha1201 opened 4 years ago

AnmolSinha1201 commented 4 years ago

This usually happens when we already have a nuget package with the same version already hosted on nuget. AFAIK, since we are not allowed to "replace" a package on nuget, is it possible for you to fail instead? That way, if this is already part of a pipeline, the pipeline would actually fail and it would be a reminder for us to update the version.

brandedoutcast commented 4 years ago

Strange 🤔 with the change detection in place it shouldn't event try to push a package with same version could you provide the action log to get a better idea?

AnmolSinha1201 commented 4 years ago

Yeah, it doesn't push the package with same version. What I am asking for is, to throw an exception too, if the same version exists. That way, the pipeline would fail. You can hide this behind a flag so it remains compatible with earlier versions.

Marfusios commented 3 years ago

+1 would be useful to fail whole build if we forget to increment version

hhoangnl commented 3 years ago

Would absolutely love this feature!

gregsdennis commented 3 years ago

Secondarily to @Marfusios's comment, it'd be great if we could get a version that runs on PRs (no publish) to check whether the version already exists. (May be a "no publish" feature request)