Always pack the library project directly (not the repo root/solution):
dotnet pack CodeWorks.Auth.csproj -c Release /p:GeneratePackageOnBuild=falseOutputs:
bin/Release/CodeWorks.Auth.<version>.nupkgbin/Release/CodeWorks.Auth.<version>.snupkg
dotnet nuget push bin/Release/CodeWorks.Auth.<version>.nupkg -k <NUGET_API_KEY> -s https://api.nuget.org/v3/index.json
dotnet nuget push bin/Release/CodeWorks.Auth.<version>.snupkg -k <NUGET_API_KEY> -s https://api.nuget.org/v3/index.jsongit tag v<version>
git push origin v<version>Use the task:
release: bump-tag-push
It will:
- Update
<Version>inCodeWorks.Auth.csproj - Run release pack validation
- Commit the version bump
- Create
v<version>tag - Push branch and tag to
origin
Task files:
.vscode/tasks.jsonscripts/release.sh