This repository has been archived by the owner on Feb 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
83 lines (69 loc) · 2.2 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
trigger:
batch: true
branches:
include:
- master
- release/*
paths:
exclude:
- README.md
pr:
branches:
include:
- master
- release/*
variables:
SolutionFile: 'src/StreamJsonRpcMessagePack.sln'
CommonBuildOptions: '-nologo --verbosity:quiet -p:Platform=AnyCPU --configuration Release'
jobs:
- job: build
# vs2017 because the job needs .NET Framework SDK 4.6.1 and 4.7.1.
pool:
vmImage: 'vs2017-win2016'
steps:
- task: PowerShell@2
displayName: 'Set Variables'
inputs:
targetType: 'filePath'
failOnStderr: true
filePath: '$(Build.SourcesDirectory)/build/SetAzurePipelineVariables.ps1'
- task: DotNetCoreInstaller@0
displayName: 'Use .NET Core sdk 3.0.100'
inputs:
version: 3.0.100
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
projects: '$(SolutionFile)'
verbosityRestore: Quiet
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
projects: '$(SolutionFile)'
arguments: '$(CommonBuildOptions)'
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
projects: src/JsonRpcMessagePackFormatter.Test/JsonRpcMessagePackFormatter.Test.csproj
arguments: '$(CommonBuildOptions)'
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.9.2'
inputs:
versionSpec: 4.9.2
- task: NuGetCommand@2
displayName: 'NuGet custom'
inputs:
command: custom
arguments: 'pack -Verbosity quiet -ForceEnglishOutput -Version $(PackageVersion) -BasePath bin/JsonRpcMessagePackFormatter/AnyCPU/Release -OutputDirectory bin/nupkg -Properties commitHash=$(Build.SourceVersion) build/nuspec/Asmichi.StreamJsonRpcMessagePack.nuspec'
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: 'bin/nupkg/*'
TargetFolder: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'