diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index a0a1b5310e..4596f9e59d 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -54,10 +54,15 @@ stages: inputs: versionSpec: '6.4.0' - - template: restore.yml@templates - parameters: - nuGetServiceConnections: GitHubPackageGetFeed - nuGetSources: --source https://nuget.pkg.github.com/FirelyTeam/index.json + - ${{ if eq(variables.useGitHubPackageFeed, 'yes') }}: + - template: restore.yml@templates + parameters: + nuGetServiceConnections: GitHubPackageGetFeed + nuGetSources: --source https://nuget.pkg.github.com/FirelyTeam/index.json + + - ${{ if eq(variables.useGitHubPackageFeed, 'no') }}: + - script: dotnet restore --source https://api.nuget.org/v3/index.json + displayName: 'Run dotnet restore' - task: DotNetCoreCLI@2 displayName: Build diff --git a/build/pipeline-variables.yml b/build/pipeline-variables.yml index 3d767eff63..95e7dd07ae 100644 --- a/build/pipeline-variables.yml +++ b/build/pipeline-variables.yml @@ -5,4 +5,5 @@ variables: isTagBranch: $[startswith(variables['Build.SourceBranch'], 'refs/tags/v')] GITHUB_PACKAGES_APIKEY: $(GitHubPushPackagesAPIKey) # key is set in variable group APIKeys - NUGET_APIKEY: $(NuGetSDKAPIKey) # key is set in variable group APIKeys \ No newline at end of file + NUGET_APIKEY: $(NuGetSDKAPIKey) # key is set in variable group APIKeys + useGitHubPackageFeed: 'no' # possible values: 'yes', 'no' \ No newline at end of file