-
Notifications
You must be signed in to change notification settings - Fork 62
/
azure-pipelines.yml
75 lines (64 loc) · 1.73 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
# Build for both .net standard 2.0 and .net framework 2.0/4.5 + nuget publish
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@0
inputs:
versionSpec: '>=4.3'
- task: DotNetCoreCLI@2
displayName: Build .net standard 2.0
inputs:
command: 'build'
projects: '**/netstandard.csproj'
configuration: '$(BuildConfiguration)'
feedsToUse: 'select'
versioningScheme: 'off'
- task: MSBuild@1
displayName: Build .net framework 2.0
inputs:
solution: '**/net20.csproj'
platform: 'AnyCPU'
configuration: '$(BuildConfiguration)'
- task: MSBuild@1
displayName: Build .net framework 4.5
inputs:
solution: '**/net45.csproj'
platform: 'AnyCPU'
configuration: '$(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Test .net standard 2.0
inputs:
command: 'test'
projects: '**/test.csproj'
arguments: '--configuration $(BuildConfiguration)'
testRunTitle: '.net standard test'
feedsToUse: 'select'
versioningScheme: 'off'
- task: NuGetCommand@2
displayName: Prepare nuget package
inputs:
command: 'pack'
feedsToUse: 'select'
packagesToPack: '**/Zipstorer.nuspec'
versioningScheme: 'off'
- task: CopyFiles@2
displayName: Copy Artifacts
enabled: 'false'
inputs:
SourceFolder: '$(Agent.BuildDirectory)'
Contents: '**/*.nupkg'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder: true
OverWrite: true
flattenFolders: true
- task: NuGetCommand@2
displayName: 'Publish nuget package'
inputs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg'
nuGetFeedType: external
publishFeedCredentials: Nuget.org