-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.yml
98 lines (79 loc) · 2.4 KB
/
build.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
####################################################################
# VSTS Build Configuration, Version 1.1
#
# (c)2018 superdev GmbH
####################################################################
name: 2.0.$(date:yy)$(DayOfYear).$(rev:rr)
queue:
name: Hosted VS2017
demands:
- msbuild
- visualstudio
- vstest
trigger:
- master
- develop
- release/*
steps:
- task: bleddynrichards.Assembly-Info-Task.Assembly-Info-Task.Assembly-Info-Task@1
displayName: 'Set Assembly Manifest Data'
inputs:
FileNames: |
EntityFramework.Toolkit.EF6.csproj
EntityFramework.Toolkit.EF6.Contracts.csproj
InsertAttributes: true
Title: 'EntityFramework.Toolkit.EF6'
Description: ''
Company: 'superdev GmbH'
Copyright: '(c) $(date:yyyy) superdev GmbH'
VersionNumber: '$(Build.BuildNumber)'
FileVersionNumber: '$(Build.BuildNumber)'
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.4.1'
inputs:
versionSpec: 4.4.1
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: '$(Parameters.solution)'
- powershell: |
Write-Host "##vso[task.setvariable variable=PackageVersion]$(Build.BuildNumber)"
Write-Host "##vso[task.setvariable variable=PackageVersionPre]$(Build.BuildNumber)$(BuildVersionPostfix)"
displayName: 'Set PackageVersion'
- task: VSBuild@1
displayName: 'Build solution'
inputs:
solution: '$(Parameters.solution)'
msbuildArgs: ''
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Run UnitTests'
inputs:
command: test
projects: '**/*.Tests.csproj'
arguments: ''
- task: DotNetCoreCLI@2
displayName: 'Pack NuGet PreRelease'
inputs:
command: pack
packagesToPack: '**\EntityFramework.Toolkit.EF6*.csproj'
versioningScheme: byEnvVar
versionEnvVar: PackageVersionPre
- task: DotNetCoreCLI@2
displayName: 'Pack NuGet Prod'
inputs:
command: pack
packagesToPack: '**\EntityFramework.Toolkit.EF6*.csproj'
versioningScheme: byEnvVar
versionEnvVar: PackageVersion
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: |
**\bin\$(BuildConfiguration)\**
**\bin\*.nupkg
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'