-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
88 lines (80 loc) · 2.06 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
79
80
81
82
83
84
85
86
87
88
trigger:
branches:
include:
- v11/main
- v11/develop
- v11/release/*
- v11/hotfix
tags:
include:
- 11.*
pool:
name: Default
variables:
BuildConfiguration: 'release'
BuildPlatform: 'any cpu'
Solution: '**\*.sln'
stages:
- stage: build
displayName: Build
jobs:
- job: build
displayName: Build
steps:
- checkout: self
fetchDepth: 0
clean: true
- task: GitVersion@5
inputs:
configFilePath: GitVersion.yml
updateAssemblyInfo: true
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '6.x'
- task: DotNetCoreCLI@2
inputs:
command: pack
arguments: '--configuration $(BuildConfiguration) -p:Version=$(GitVersion.NuGetVersion)'
packagesToPack: '**\\Infocaster.Telemetry.Umbraco.csproj'
versioningScheme: byEnvVar
versionEnvVar: GitVersion.NuGetVersion
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- stage: release
displayName: Release
dependsOn: build
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
variables:
packageGlob: '$(Pipeline.Workspace)/**/Infocaster.Telemetry.Umbraco*.nupkg'
jobs:
- job: releaseArtifact
displayName: Push to artifacts
workspace:
clean: all
steps:
- checkout: none
- download: current
patterns: '**/*.nupkg'
- task: DotNetCoreCLI@2
inputs:
command: push
publishVstsFeed: '3356baca-d7d8-497c-a5fa-ebd93f79f7c7'
versioningScheme: byBuildNumber
packagesToPush: $(packageGlob)
- job: releaseNuget
displayName: Push to nuget
workspace:
clean: all
steps:
- checkout: none
- download: current
patterns: '**/*.nupkg'
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: nuget
arguments: 'push $(packageGlob) -s https://api.nuget.org/v3/index.json --api-key $(NuGetApiKey)'