NuGet now has something called Trusted Publishing that you can use instead of preconfigured long-living API keys. This is more secure and needs no maintenance (the at most yearly regeneration of API keys) but needs changes to the publishing workflow and the creation of Trusted Publishing Policies for every repository.
For now, it's a question whether there will be a better way than having to create a Trusted Publishing Policy for every repository: NuGet/NuGetGallery#10896.
Jira issue
NuGet now has something called Trusted Publishing that you can use instead of preconfigured long-living API keys. This is more secure and needs no maintenance (the at most yearly regeneration of API keys) but needs changes to the publishing workflow and the creation of Trusted Publishing Policies for every repository.
For now, it's a question whether there will be a better way than having to create a Trusted Publishing Policy for every repository: NuGet/NuGetGallery#10896.
publish-nugetworkflow and action with the option to use Trusted Publishing. The API key-based publishing should still be available, but it needs to be documented that the recommended approach is Trusted Publishing.Jira issue