✅ Simple way to push a C# project as a NuGet package within a GitHub workflow yml
I am not sure if there is a better place to ask this question as its really only C# adjacent, but maybe someone here knows the answer.
Does anyone have a simple and up to date example of how to push a C# project as a NuGet package for GitHub actions? There are a lot of examples online but all of the ones I can find seem to be out of date or use a third-party workflow which I would like to avoid.
If I was using Azure DevOps I would simply add the following to my yml file:
however, the GitHub actions equivalent seems to elude me.
5 Replies
run: dotnet pack
and run: dotnet nuget push
would prolly be the easiest
I use
for exampleAwesome thanks @Angius ,
In case anyone else wants another example here is what I ended up doing
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.@TeBeConsulting Hey thanks for the refactored implementation. I changed my pipeline to reflect those changes you recommended. However the path part ''./build/packages/*.nupkg" doesnt work. Something to due with running on windows instead of Linux I think, but thats fine honestly.