Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NuGetBuild not taking effect in the publish-nuget action (OSOE-842) #342

Closed
DemeSzabolcs opened this issue Apr 25, 2024 · 10 comments · Fixed by #343 or #344
Closed

Fix NuGetBuild not taking effect in the publish-nuget action (OSOE-842) #342

DemeSzabolcs opened this issue Apr 25, 2024 · 10 comments · Fixed by #343 or #344
Assignees
Labels
bug Something isn't working

Comments

@DemeSzabolcs
Copy link
Member

DemeSzabolcs commented Apr 25, 2024

See: https://github.com/Lombiq/UI-Testing-Toolbox/actions/runs/8836448057/job/24264925167

It seems like -p:NuGetBuild=true is not applied.

This is indicated here, because the action searches for Lombiq.HelpfulLibraries.OrchardCore.csproj instead of using the NuGet package: https://github.com/Lombiq/UI-Testing-Toolbox/actions/runs/8836448057/job/24264925167#step:4:207 and also here for Lombiq.Npm.Targets.props: https://github.com/Lombiq/UI-Testing-Toolbox/actions/runs/8836448057/job/24264925167#step:4:1304

Jira issue

@DemeSzabolcs DemeSzabolcs added the bug Something isn't working label Apr 25, 2024
@github-actions github-actions bot changed the title Fix broken publish-nuget action Fix broken publish-nuget action (OSOE-840) Apr 25, 2024
@Piedone
Copy link
Member

Piedone commented Apr 25, 2024

This last worked on the 28th February here. Possibly between .NET 8.0.201 and 8.0.204 this broke.

@Piedone
Copy link
Member

Piedone commented Apr 26, 2024

Perhaps the .NET SDK change broke -p and we need to use /p.

@DemeSzabolcs
Copy link
Member Author

Perhaps the .NET SDK change broke -p and we need to use /p.

I already tried that on the parameters that are passed to NewNuGetPackage ps1 script or what it's called. Though I might missed something.

@Piedone
Copy link
Member

Piedone commented Apr 26, 2024

BTW since we use -p everywhere, including for solution builds here, then if that were to be generally broken, all code analysis violations would be silent for all of ours builds too, and that's not the case. So, there's something else.

@Piedone
Copy link
Member

Piedone commented Apr 26, 2024

And BTW this HL publish also worked two weeks ago. So, NuGet publishing is not completely broken. However, that project doesn't use NuGetBuild.

@hyzx86
Copy link

hyzx86 commented Apr 27, 2024

Mark

https://github.com/EasyOC/EasyOC.Modules/actions/runs/8861373253/job/24333516410

Version number for the .NET build products: 1.8.0-preview-1
Building solution or project with `dotnet build  --configuration:Release --nologo --verbosity:minimal --warnaserror --warnAsMessage:MSB3026 --consoleLoggerParameters:NoSummary -p:TreatWarningsAsErrors=True -p:RunAnalyzersDuringBuild=false -p:Retries=4 -p:RetryDelayMilliseconds=1000 -p:Version=1.8.0-preview-1 --no-restore -p:NuGetBuild=true -p:LangVersion=Latest -p:GenerateDocumentationFile=True -p:NoWarn=CS1573%3BCS1591%3BVSTHRD002%3BVSTHRD200 -p:EnableNETAnalyzers=false -p:ContinuousIntegrationBuild=true -p:DebugSymbols=true -p:DebugType=portable`.

NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. 

@Piedone
Copy link
Member

Piedone commented Apr 28, 2024

That's not this issue. You try to publish a .NET 8 project while the workflow sets up .NET 6.x. You'll need to pull the latest form this repo into EasyOC/GitHub-Actions, since the current version uses .NET 8, or configure .NET 8 with this option: https://github.com/Lombiq/GitHub-Actions/blob/dev/.github/workflows/publish-nuget.yml#L28

BTW now we have versioning in this project, so you don't necessarily need to fork it, you can also reference @v1.0 instead of the rolling release @dev.

@hyzx86
Copy link

hyzx86 commented Apr 28, 2024

That's not this issue. You try to publish a .NET 8 project while the workflow sets up .NET 6.x. You'll need to pull the latest form this repo into EasyOC/GitHub-Actions, since the current version uses .NET 8, or configure .NET 8 with this option: https://github.com/Lombiq/GitHub-Actions/blob/dev/.github/workflows/publish-nuget.yml#L28

BTW now we have versioning in this project, so you don't necessarily need to fork it, you can also reference @v1.0 instead of the rolling release @dev.

Problem solved, thanks for guidance! 👍

@Piedone
Copy link
Member

Piedone commented Apr 28, 2024

Awesome!

@Piedone Piedone changed the title Fix broken publish-nuget action (OSOE-840) Fix NuGetBuild not taking effect in the publish-nuget action (OSOE-840) Apr 29, 2024
@Piedone Piedone self-assigned this Apr 29, 2024
@Piedone Piedone changed the title Fix NuGetBuild not taking effect in the publish-nuget action (OSOE-840) Fix NuGetBuild not taking effect in the publish-nuget action (OSOE-842) Apr 29, 2024
@Piedone
Copy link
Member

Piedone commented Apr 29, 2024

Investigation notes:

Fixed working publish: https://github.com/Lombiq/UI-Testing-Toolbox/actions/runs/8884157839/job/24394552735.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment