diff --git a/.github/workflows/actions-pr.yml b/.github/workflows/actions-pr.yml index b9b6a4b..c42c6e0 100644 --- a/.github/workflows/actions-pr.yml +++ b/.github/workflows/actions-pr.yml @@ -31,7 +31,7 @@ jobs: global-json-file: global.json - name: Restore dependencies - run: dotnet restore + run: dotnet restore --source https://api.nuget.org/v3/index.json - name: Build run: dotnet build --no-restore --configuration ${{ env.BUILD_CONFIGURATION }} ${{ env.PROJECT_PATH }} diff --git a/build.yml b/build.yml index 09b75e0..b7a8455 100644 --- a/build.yml +++ b/build.yml @@ -10,37 +10,38 @@ steps: inputs: useGlobalJson: true + - task: NuGetAuthenticate@1 + displayName: Authenticate to Azure Artifacts + - task: DotNetCoreCLI@2 displayName: Restore Build inputs: command: 'restore' projects: 'VSConfigFinder' - feedsToUse: 'select' - vstsFeed: 'Setup-Dependencies' - includeNuGetOrg: false + feedsToUse: 'config' + nugetConfigPath: '$(Build.SourcesDirectory)\nuget.config' - task: DotNetCoreCLI@2 displayName: Build inputs: command: 'build' projects: 'VSConfigFinder' - arguments: '--configuration $(BuildConfiguration) --no-restore' + arguments: '--configuration $(BuildConfiguration) --no-restore --configfile $(Build.SourcesDirectory)\nuget.config' - task: DotNetCoreCLI@2 displayName: Restore Test inputs: command: 'restore' projects: 'VSConfigFinder.Test' - feedsToUse: 'select' - vstsFeed: 'Setup-Dependencies' - includeNuGetOrg: false + feedsToUse: 'config' + nugetConfigPath: '$(Build.SourcesDirectory)\nuget.config' - task: DotNetCoreCLI@2 displayName: Test inputs: command: 'test' projects: 'VSConfigFinder.Test' - arguments: '--configuration $(BuildConfiguration) --no-restore' + arguments: '--configuration $(BuildConfiguration) --no-restore -p:RestoreConfigFile=$(Build.SourcesDirectory)\nuget.config' - task: DotNetCoreCLI@2 displayName: Publish diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..1d9db33 --- /dev/null +++ b/nuget.config @@ -0,0 +1,7 @@ + + + + + + +