-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
71 lines (58 loc) · 1.71 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
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
steps:
- checkout: self
persistCredentials: true
- task: UseDotNet@2
displayName: 'Use .NET Core 3.1.x SDK'
inputs:
packageType: 'sdk'
version: '3.1.x'
- task: gitversion/setup@0
displayName: 'Setup GitVersion'
inputs:
versionSpec: '5.x'
- task: gitversion/execute@0
displayName: Use GitVersion
- task: DotNetCoreCLI@2
inputs:
command: 'restore'
projects: '**/*.csproj'
feedsToUse: 'select'
vstsFeed: 'ae104835-07d5-4d1e-a39c-14132e2e8544'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: 'build'
projects: '**/*.csproj'
arguments: '/property:InformationalVersion=$(semver)'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: 'test'
- task: DotNetCoreCLI@2
displayName: Publish project to $(Build.ArtifactStagingDirectory)
inputs:
command: publish
publishWebProjects: true
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory) /property:InformationalVersion=$(semver)'
zipAfterPublish: true
- task: PublishBuildArtifacts@1
displayName: 'Move to artifacts'
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)
ArtifactName: drop
publishLocation: 'Container'
- script: |
git tag $(GitVersion.FullSemVer)
git push origin $(GitVersion.FullSemVer)
workingDirectory: $(Build.SourcesDirectory)
displayName: 'Add git tag $(GitVersion.FullSemVer)'