setup-dotnet icon indicating copy to clipboard operation
setup-dotnet copied to clipboard

Support registration manual NuGet source to NuGet.Config

Open 134130 opened this issue 2 years ago • 1 comments

Description: Support registration manual NuGet source to NuGet.Config

Justification: When we uses private NuGet repository like nexus, We need to configure our source to NuGet.Config.

I'm currently using with these code, But It is too long and scattered in many workflows.

- name: Add NuGet source (Private Nexus)
  id: add-nuget-source
  run: |
    dotnet nuget remove source Nexus | true
    dotnet nuget add source ${{ secrets.PRIVATE_NUGET_SOURCE }} \
      --name Nexus \
      --username ${{ secrets.PRIVATE_AGENT_NEXUS_USERNAME }} \
      --password ${{ secrets.PRIVATE_AGENT_NEXUS_PASSWORD }} \
      --store-password-in-clear-text

Also, we need to remove this configure with these code when using ghcr.

- name: Remove NuGet source (Private Nexus)
  if: ${{ always() && steps.add-nuget-source.conclusion == 'success' }}
  run: dotnet nuget remove source Nexus | true

Are you willing to submit a PR? Yes, I'm interested in. But I need a help. I don't know nice way to resolve these many arguments. Some idea please

134130 avatar Apr 28 '23 08:04 134130

Hi, @134130, thank you for the feature request! We will investigate the issue and get back to you with updates!

IvanZosimov avatar Apr 28 '23 09:04 IvanZosimov