forked from BotBuilderCommunity/botbuilder-community-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
78 lines (66 loc) · 2.1 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
- develop
- release/*
- feature/*
pool:
vmImage: 'windows-2019'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: gittools.gitversion.gitversion-task.GitVersion@4
displayName: GitVersion
inputs:
preferBundledVersion: false
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: 'Bot.Builder.Community.sln'
- task: DotNetCoreCLI@2
displayName: dotnet build
inputs:
command: build
projects: 'Bot.Builder.Community.sln'
versioningScheme: byEnvVar
versionEnvVar: GitVersion.NuGetVersion
arguments: "--configuration $(buildConfiguration)"
- task: DotNetCoreCLI@2
displayName: dotnet test
inputs:
command: test
projects: 'Bot.Builder.Community.sln'
configuration: '$(buildConfiguration)'
nobuild: true
condition: succeeded()
- task: DotNetCoreCLI@2
displayName: dotnet pack
inputs:
projects: 'Bot.Builder.Community.sln'
command: pack
packDirectory: '$(Build.ArtifactStagingDirectory)/packages'
configuration: '$(buildConfiguration)'
versioningScheme: byEnvVar
versionEnvVar: GitVersion.NuGetVersion
nobuild: true
condition: succeeded()
- task: PublishBuildArtifacts@1
condition: succeeded()
- task: NuGetCommand@2
displayName: 'Publish Master Packages to NuGet Feed'
inputs:
command: 'push'
packagesToPush: '$(build.artifactStagingDirectory)/packages/*.nupkg'
nuGetFeedType: external
publishFeedCredentials: 'BotBuilderCommunityNuGet'
condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq('true', variables['FORCE_PUSH_NUGET'])))
- task: KriefMikael.githubtools.GitHubTag.GitHubTag@1
displayName: 'Tag Branch'
inputs:
githubEndpoint: BotBuilderCommunity
tag: 'v$(GitVersion.NuGetVersion)'
condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq('true', variables['FORCE_PUSH_NUGET'])))