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

Silent fail on missing license #27

Closed mswehli closed 4 years ago

mswehli commented 4 years ago

Hi,

Just came across an small issue, but when the license file isn't included for the project, and so the NuGet pack step fails, the action still registers it as a success. So below is a cutout of the output for a small project i have on github, as you can see the build succeeds, but the pack fails, and the push fails.

`-------------------------------------------------------------------------------------- Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.

Restore completed in 742.19 ms for /home/runner/work/moodio/moodio/Moodio.Common/Moodio.Common.csproj. Moodio.Common -> /home/runner/work/moodio/moodio/Moodio.Common/bin/Release/netstandard2.0/Moodio.Common.dll

Build succeeded. 0 Warning(s) 0 Error(s)

Time Elapsed 00:00:14.06 Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.

/usr/share/dotnet/sdk/3.1.201/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(198,5): error NU5030: The license file 'LICENSE' does not exist in the package. [/home/runner/work/moodio/moodio/Moodio.Common/Moodio.Common.csproj] Generated Package: undefined error: File does not exist (undefined).

`

brandedoutcast commented 4 years ago

Thanks for reporting it, rest assured