Skip to content

Support registration manual NuGet source to NuGet.Config #415

Open
@134130

Description

@134130

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logicneeds eyes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions