diff --git a/.github/workflows/codeQL.yml b/.github/workflows/codeQL.yml index bf888d3..9112fb2 100644 --- a/.github/workflows/codeQL.yml +++ b/.github/workflows/codeQL.yml @@ -68,11 +68,18 @@ jobs: with: dotnet-version: '3.1.x' + - name: Set up .NET 6 + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' + - name: Restore dependencies - run: dotnet restore $solution + shell: pwsh + run: dotnet restore "$env:GITHUB_WORKSPACE\$env:solution" --configfile "$env:GITHUB_WORKSPACE\NuGet.config" - name: Build - run: dotnet build $solution #--configuration $config #--no-restore -p:FileVersionRevision=$GITHUB_RUN_NUMBER -p:ContinuousIntegrationBuild=true + shell: pwsh + run: dotnet build "$env:GITHUB_WORKSPACE\$env:solution" --configuration "$env:config" --no-restore -p:FileVersionRevision="$env:GITHUB_RUN_NUMBER" -p:ContinuousIntegrationBuild=true # Run CodeQL analysis - name: Perform CodeQL Analysis diff --git a/.gitignore b/.gitignore index 01cc9d6..23e6084 100644 --- a/.gitignore +++ b/.gitignore @@ -441,6 +441,7 @@ $RECYCLE.BIN/ # The build keeps auto-generating this file. We do not want this. /.nuget/NuGet.Config NuGet.Config +!/NuGet.config ## Python specifics diff --git a/NuGet.config b/NuGet.config new file mode 100644 index 0000000..93c7dc7 --- /dev/null +++ b/NuGet.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 14b86ea..81bb4d3 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -41,10 +41,15 @@ steps: version: '7.0.x' # Start by restoring all the dependencies. +- task: NuGetAuthenticate@1 + displayName: 'Authenticate to CFS' + - task: DotNetCoreCLI@2 displayName: 'Restore nuget dependencies' inputs: command: restore + feedsToUse: config + nugetConfigPath: 'NuGet.config' verbosityRestore: Minimal projects: 'src/dirs.proj' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 78a7ce1..4e55f26 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,8 +17,13 @@ variables: steps: - task: NuGetToolInstaller@1 +- task: NuGetAuthenticate@1 + displayName: 'Authenticate to CFS' + - task: NuGetCommand@2 inputs: + feedsToUse: config + nugetConfigPath: 'NuGet.config' restoreSolution: '$(solution)' - task: UseDotNet@2 diff --git a/eng/templates/build.yml b/eng/templates/build.yml index 708ecef..b642b10 100644 --- a/eng/templates/build.yml +++ b/eng/templates/build.yml @@ -44,10 +44,15 @@ jobs: version: '7.0.x' # Start by restoring all the dependencies. + - task: NuGetAuthenticate@1 + displayName: 'Authenticate to CFS' + - task: DotNetCoreCLI@2 displayName: 'Restore nuget dependencies' inputs: command: restore + feedsToUse: config + nugetConfigPath: 'NuGet.config' verbosityRestore: Minimal projects: 'src/dirs.proj'