-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
81 lines (70 loc) · 2.23 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
# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '5.x'
includePreviewVersions: false
performMultiLevelLookup: true
- task: PowerShell@2
displayName: Set the name of the Repository
inputs:
targetType: 'inline'
script: |
[string] $RepoName = "$(Build.Repository.Name)".Remove(0, "$(Build.Repository.Name)".IndexOf("/") + 1)
Write-Host "Setting the name of the Repository to '$RepoName'."
Write-Host "##vso[task.setvariable variable=RepoName]$RepoName"
- task: DotNetCoreCLI@2
displayName: Restore Nuget depenencies
inputs:
command: 'restore'
projects: '**/*.csproj'
feedsToUse: 'select'
#win-x64
- task: DotNetCoreCLI@2
displayName: Build win-x64
inputs:
command: 'publish'
publishWebProjects: false
projects: '**/*.sln'
arguments: '--configuration $(BuildConfiguration) -p:ZipOutputPath=$(Build.ArtifactStagingDirectory)'
modifyOutputPath: false
zipAfterPublish: false
#win-x64_Standalone
- task: DotNetCoreCLI@2
displayName: Build win-x64_Standalone
inputs:
command: 'publish'
publishWebProjects: false
projects: '**/*.csproj'
arguments: '-c $(BuildConfiguration) -r win-x64 -p:SelfContained=true -p:ZipOutputPath=$(Build.ArtifactStagingDirectory)'
modifyOutputPath: false
zipAfterPublish: false
- task: gitversion/setup@0
displayName: Setup GitVersion
inputs:
versionSpec: '5.x'
- task: gitversion/execute@0
displayName: Execute GitVersion
- task: GitHubRelease@1
inputs:
gitHubConnection: 'github.com_Veraatversus'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: '$(GitVersion.SemVer)'
title: '$(RepoName)-$(GitVersion.SemVer)'
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'
assets: '$(Build.ArtifactStagingDirectory)\*.zip'