forked from DerekGn/HexIO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
51 lines (47 loc) · 1.39 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
variables:
- name: BuildParameters.solution
value: '**\*.sln'
- name: TestProject
value: '**/*UnitTests.csproj'
name: v$(Major).$(Minor).$(Patch)
trigger:
- master
pool:
vmImage: windows-latest
steps:
- task: DotNetCoreCLI@2
displayName: "Build Solution"
inputs:
command: 'build'
projects: $(BuildParameters.solution)
arguments: /p:Configuration=$(BuildConfiguration)
- task: DotNetCoreCLI@2
displayName: "Run Unit Tests"
inputs:
command: 'test'
projects: $(TestProject)
arguments: '--configuration $(buildConfiguration) --collect "Code coverage"'
- task: PublishTestResults@2
displayName: "Publish Test Results"
inputs:
testRunner: VSTest
testResultsFiles: '**\*.trx'
- task: DotNetCoreCLI@2
displayName: "Pack Project"
inputs:
command: 'pack'
packagesToPack: '**/*.csproj'
versioningScheme: byEnvVar
versionEnvVar: PackageVersion
- task: GitHubRelease@1
displayName: "Publish Relase To GitHub"
inputs:
gitHubConnection: 'GitHub PAT'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: '$(Build.BuildNumber)'
title: '$(Build.BuildNumber) - $(BuildConfiguration) - $(Build.SourceBranchName)'
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'