Publish a package to nuget package manager
I needed an action which can build, pack and then push that to Nuget PM
For that, this github action fits the bill.
However, for .net 6 projects, it has got this File does not exist (1) bug
The issue is with dotnet 6 option -n as explained here.
Infact a PR is already submitted, but looks like this project is abandoned.
So here I attempted to recreate the same repo with the above fix applied here.
I followed this tutorial
I did one more thing. I applied the version parameter to the build here.
So the full command to build will now look like this
dotnet build -c Release src/Avts.DecoratorsForCcc/Avts.DecoratorsForCcc.Package/Avts.DecoratorsForCcc.Package.csproj -p:Version=0.0.25
Now the dlls will also show the version of the nuget package.
The following npm package has to be installed globally
npm i -g @vercel/ncc
Then when ever you change any file(index.js or action.yml etc)
run the followng
ncc build index.js -o dist
Reference: