-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
61 lines (52 loc) · 2.02 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
trigger:
branches:
include:
- main
- beta
pool:
name: ubuntu
steps:
- task: DotNetCoreCLI@2
displayName: 'Build'
inputs:
command: 'build'
projects: '**/*.csproj'
- script: echo $(Build.SourceBranchName)
displayName: 'Print Build.SourceBranchName'
- ${{ if notIn(variables['Build.SourceBranchName'], 'main', 'beta') }}:
- task: DotNetCoreCLI@2
displayName: 'Publish for other branches'
inputs:
command: 'publish'
arguments: '/p:Version=$(VersionAlpha).$(Build.BuildId) /p:AssemblyVersion=$(VersionAlpha).$(Build.BuildId) /p:FileVersion=$(VersionAlpha).$(Build.BuildId)'
publishWebProjects: true
- ${{ if eq(variables['Build.SourceBranchName'], 'main') }}:
- task: DotNetCoreCLI@2
displayName: 'Publish for main'
inputs:
command: 'publish'
arguments: '/p:Version=$(VersionAlpha).$(Build.BuildId) /p:AssemblyVersion=$(VersionAlpha).$(Build.BuildId) /p:FileVersion=$(VersionAlpha).$(Build.BuildId)'
publishWebProjects: true
- ${{ if eq(variables['Build.SourceBranchName'], 'beta') }}:
- task: DotNetCoreCLI@2
displayName: 'Publish for beta'
inputs:
command: 'publish'
arguments: '/p:Version=$(VersionAlpha).$(Build.BuildId) /p:AssemblyVersion=$(VersionAlpha).$(Build.BuildId) /p:FileVersion=$(VersionAlpha).$(Build.BuildId)'
publishWebProjects: true
- task: DotNetCoreCLI@2
displayName: 'test'
inputs:
command: 'test'
projects: '**/*Test.csproj'
arguments: '--filter "FullyQualifiedName!~IntegrationTest" --collect "XPlat Code Coverage"'
- task: PublishCodeCoverageResults@2
displayName: 'Publish coverage test'
inputs:
summaryFileLocation: '$(Agent.TempDirectory)/**/coverage.cobertura.xml'
- task: PublishBuildArtifacts@1
displayName: 'post artifact'
inputs:
PathtoPublish: 'Blueprint/bin/Release/net8.0/publish.zip'
ArtifactName: 'drop'
publishLocation: 'Container'