-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathazure-pipelines.yml
50 lines (49 loc) · 1.39 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
trigger:
batch: true
branches:
include:
- master
- refs/tags/*
variables:
vmImage: 'windows-latest'
stages:
- stage: build
displayName: 'Build'
jobs:
- job: cake
displayName: 'Cake'
pool:
vmImage: $(vmImage)
variables:
cake.buildTarget: 'CI'
build.configuration: 'Release'
cake.verbosity: 'Verbose'
steps:
- powershell: ./build.ps1 -Target "$(cake.buildTarget)" -Configuration "$(build.configuration)" -Verbosity "$(cake.verbosity)"
displayName: 'Cake Build'
- stage: PublishRelease
displayName: 'Publish Release'
dependsOn: build
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
jobs:
- job: PublishNuGet
displayName: 'Publish to NuGet'
pool:
vmImage: $(vmImage)
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'specific'
itemPattern: '**'
downloadPath: '$(System.ArtifactsDirectory)'
- task: NuGetToolInstaller@1
inputs:
versionSpec:
checkLatest: true
- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;$(Build.ArtifactStagingDirectory)/**/*.snupkg'
nuGetFeedType: 'external'
publishFeedCredentials: '$(artifacts.nuget.feed)'