Use the trusted publisher workflow for NuGet instead of API key. https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing