forked from Umplify/xunit-dependency-injection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
78 lines (73 loc) · 2.19 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
name: $(Major).$(Minor).$(rev:r)
pr: none
trigger:
batch: true
tags:
include:
- refs/tags/*
paths:
exclude:
- examples/*
- README.md
pool:
vmImage: 'ubuntu-latest'
steps:
- script: echo Build Number $(name)
- task: UseDotNet@2
displayName: 'Use .NET 6.0 sdk'
inputs:
packageType: sdk
version: 6.0.403
installationPath: $(Agent.ToolsDirectory)/dotnet
- script: echo Started restoring the source code
- task: DotNetCoreCLI@2
displayName: 'Restoring'
inputs:
command: 'restore'
projects: '**/Xunit.Microsoft.DependencyInjection.csproj'
feedsToUse: 'select'
- script: echo Started building the source code
- task: DotNetCoreCLI@2
displayName: 'Building'
inputs:
command: 'build'
projects: '**/Xunit.Microsoft.DependencyInjection.csproj'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Running tests in example folder'
inputs:
command: 'test'
projects: '**/examples/Xunit.Microsoft.DependencyInjection.ExampleTests'
arguments: '--configuration $(BuildConfiguration)'
testRunTitle: 'Running sample tests'
- script: echo Started publishing
- task: DotNetCoreCLI@2
displayName: 'Publishing'
inputs:
command: 'publish'
publishWebProjects: false
projects: '**/Xunit.Microsoft.DependencyInjection.csproj'
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
- script: echo Started dropping
- task: PublishBuildArtifacts@1
displayName: 'Dropping'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- script: echo Started packing and pushing
- task: NuGetCommand@2
displayName: 'Packing'
inputs:
command: 'pack'
packagesToPack: '**/Xunit.Microsoft.DependencyInjection.csproj'
versioningScheme: 'byEnvVar'
versionEnvVar: 'Build.BuildNumber'
- task: NuGetCommand@2
displayName: 'Pushing to nuget.org'
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGet'
allowPackageConflicts: true