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

HTTP 409 when publishing multiple projects #15

Closed sven-n closed 4 years ago

sven-n commented 4 years ago

Thank you for this great action! I'm currently trying to set it up for one of my projects. Similar to #9, I want to publish multiple projects in one job. In my case, the projects build to the same output directory. So, when the second package is about to be pushed, the first one is sent again, because of the specified *.nupkg filename pattern.

const NUGET_PUSH_RESPONSE = this._execAndCapture(`dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${this.NUGET_KEY}`)

This leads to an http result 409 and lets the Action fail. My error message is this one:

##[error]😭 error: Response status code does not indicate success: 409 (A package with ID '...' and version '...' already exists and cannot be modified.).

Suggestions:

Thank you :)

brandedoutcast commented 4 years ago

Thank You 🙌 for taking your time out to write such a detailed description with fix suggestions too

I went with ${this.PACKAGE_NAME}*.nupkg as the --skip-duplicate is dependent on .net core sdk version

Please feel free to raise a PR if you know how to fix an issue. Issue / PR either way you contributed to this action so 🤝