pulumi / pulumi-dotnet

.NET support for Pulumi
Apache License 2.0
27 stars 25 forks source link

[ci/publishing] Fix generating nuget packages on build for dev releases #362

Closed Zaid-Ajaj closed 1 month ago

Zaid-Ajaj commented 1 month ago

Resolves #351

The error message in the issue suggests that dotnet build isn't creating the nuget package even though we have a property GeneratePackageOnBuild set in the project settings.

This PR fixes the problem by explicitly executing dotnet pack against the projects before trying to find the nuget package and publishing it

EDIT: removed TargetFramework property from directory build props

Zaid-Ajaj commented 1 month ago

Do we know why that line was necessary to add to sdk/Directory.Build.props?

It doesn't seem necessary, the projects in ./sdk already set theTargetFrameworks (not TargetFramework) so they don't require shared the property 🤔 I will remove it from sdk/Directory.Build.props and see if that breaks anything