Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 48 additions & 3 deletions build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ stages:
- deployment: myget
displayName: MyGet
environment: MyGet
variables:
GITHUB_PACKAGES_APIKEY: $(GitHubPushPackagesAPIKey) # key is set in UI of Azure Devops
strategy:
runOnce:
deploy:
Expand All @@ -226,12 +224,59 @@ stages:
nuGetFeedType: external
publishFeedCredentials: MyGet
verbosityPush: Normal

- stage: deploy_git
displayName: Deploy to GitHub
dependsOn: test
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # not a PR
jobs:
- deployment: gitHub
displayName: GitHub Packages
environment: GitHub
variables:
GITHUB_PACKAGES_APIKEY: $(GitHubPushPackagesAPIKey) # key is set in UI of Azure Devops
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: NuGetPackages
displayName: Download artifact NuGetPackages
- task: DotNetCoreCLI@2
displayName: 'GitHub push all packages'
condition: and(succeeded(), eq(variables.isTagBranch, false))
inputs:
command: custom
custom: nuget
arguments: 'push $(Agent.BuildDirectory)\NuGetPackages\*.nupkg --api-key $(GITHUB_PACKAGES_APIKEY) --source https://nuget.pkg.github.com/FirelyTeam/index.json'
- task: DotNetCoreCLI@2
displayName: 'GitHub push'
displayName: 'GitHub push STU3 packages only and common packages'
condition: and(succeeded(), and(eq(variables.isTagBranch, true), endswith(variables['Build.SourceBranch'], '-stu3')))
inputs:
command: custom
custom: nuget
arguments: 'push $(Agent.BuildDirectory)\NuGetPackages\*.nupkg --api-key $(GITHUB_PACKAGES_APIKEY) --source https://nuget.pkg.github.com/FirelyTeam/index.json'
- task: DotNetCoreCLI@2
displayName: 'GitHub push R4 packages only'
condition: and(succeeded(), and(eq(variables.isTagBranch, true), endswith(variables['Build.SourceBranch'], '-r4')))
inputs:
command: custom
custom: nuget
arguments: 'push $(Agent.BuildDirectory)\NuGetPackages\*R4*.nupkg --api-key $(GITHUB_PACKAGES_APIKEY) --source https://nuget.pkg.github.com/FirelyTeam/index.json'
- task: DotNetCoreCLI@2
displayName: 'GitHub push R4B packages only'
condition: and(succeeded(), and(eq(variables.isTagBranch, true), endswith(variables['Build.SourceBranch'], '-r4B')))
inputs:
command: custom
custom: nuget
arguments: 'push $(Agent.BuildDirectory)\NuGetPackages\*R4B*.nupkg --api-key $(GITHUB_PACKAGES_APIKEY) --source https://nuget.pkg.github.com/FirelyTeam/index.json'
- task: DotNetCoreCLI@2
displayName: 'GitHub push R5 packages only'
condition: and(succeeded(), and(eq(variables.isTagBranch, true), endswith(variables['Build.SourceBranch'], '-r5')))
inputs:
command: custom
custom: nuget
arguments: 'push $(Agent.BuildDirectory)\NuGetPackages\*R5*.nupkg --api-key $(GITHUB_PACKAGES_APIKEY) --source https://nuget.pkg.github.com/FirelyTeam/index.json'

- stage: deploy_nuget
displayName: Deploy to NuGet
Expand Down