-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
111 lines (96 loc) · 3.14 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
trigger:
branches:
include:
- '*'
tags:
include:
- '*'
pool:
vmImage: 'windows-2019'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
templateVersion: '2.0.4'
OcarambaVersion: '4.1.0'
SeleniumWebDriverVersion: '4.4.0'
SeleniumSupportVersion: '4.4.0'
SeleniumWebdriverChromeDriverVersion: '109.0.5414.7400'
SeleniumWebDriverGeckoDriverVersion: '0.31.0'
SeleniumWebDriverIEDriverVersion: '4.3.0'
NUnitVersion: '3.13.3'
NUnit3TestAdapterVersion: '4.3.1'
MicrosoftNetTestSdkVersion: '17.4.0'
MSTestTestAdapterVersion: '2.2.10'
MSTestTestFrameworkVersion: '2.2.10'
NPOIVersion: '2.5.6'
NLogVersion: '5.1.1'
steps:
- task: PowerShell@2
displayName: Find latest tag name
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
inputs:
targetType: 'inline'
script: |
$tags = git tag --sort=-creatordate
$tag = $tags[0]
Write-Host "##vso[task.setvariable variable=templateVersion]$tag"
- task: PowerShell@2
displayName: Set template version
inputs:
targetType: 'inline'
script: '((Get-Content -path ./Ocaramba.Templates.VSIX/source.extension.vsixmanifest -Raw) -replace ''Version="\d\.\d.\d" Language'',''Version="$(templateVersion)" Language'') | Set-Content -Path ./Ocaramba.Templates.VSIX/source.extension.vsixmanifest'
- task: PowerShell@2
displayName: Set Packages Version
inputs:
filePath: './setPackagesVersions.ps1'
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: './Ocaramba.Templates.VSIX/Ocaramba.Templates.csproj'
feedsToUse: 'select'
restoreDirectory: '../packages'
- task: Assembly-Info-NetFramework@2
inputs:
Path: '$(Build.SourcesDirectory)'
FileNames: |
**\AssemblyInfo.*
InsertAttributes: false
FileEncoding: 'auto'
WriteBOM: false
Configuration: '$(buildConfiguration)'
VersionNumber: '$(templateVersion)'
FileVersionNumber: '$(templateVersion).$(Build.BuildId)'
InformationalVersion: '$(templateVersion)'
LogLevel: 'verbose'
FailOnWarning: false
DisableTelemetry: false
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/v:minimal'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
vsVersion: '16.0'
- task: PublishPipelineArtifact@1
inputs:
targetPath: './Ocaramba.Templates.VSIX/bin/Release/Ocaramba.Templates.vsix'
artifact: 'Template'
publishLocation: 'pipeline'
- task: GitHubRelease@1
condition: and(succeeded(),startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
inputs:
gitHubConnection: 'OcaramabaTemplateRelease'
repositoryName: '$(Build.Repository.Name)'
action: 'edit'
tagSource: 'gitTag'
tagPattern: '\d\.\d.\d'
target: '$(Build.SourceVersion)'
tag: '$(templateVersion)'
title: 'Version $(templateVersion)'
changeLogCompareToRelease: 'lastNonDraftReleaseByTag'
changeLogType: 'commitBased'