-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
40 lines (31 loc) · 1.28 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
- release/*
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: release
steps:
- task: GitVersion@5
displayName: gitversion
inputs:
runtime: 'core'
configFilePath: 'GitVersion.yml'
- script: dotnet restore
displayName: 'dotnet restore'
- script: dotnet build --configuration $(buildConfiguration) /p:Version=$(GitVersion.SemVer);AssemblyVersion=$(GitVersion.AssemblySemVer)
displayName: 'dotnet build $(buildConfiguration)'
- script: dotnet pack --output $(Build.ArtifactStagingDirectory) --configuration $(buildConfiguration) /p:Version=$(GitVersion.SemVer);AssemblyVersion=$(GitVersion.AssemblySemVer)
displayName: 'dotnet pack $(buildConfiguration)'
- task: NuGetCommand@2
displayName: 'NuGet Push'
condition: and (succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: 'c16f4db1-6f90-4b89-8743-72d31bfcf503/b868e38f-8a99-4055-af2a-1591fcaf3749'