1
+ trigger :
2
+ - master
3
+
4
+ pr :
5
+ - master
6
+
7
+ variables :
8
+ solution : ' **/ICSharpCode.AvalonEdit.sln'
9
+ buildPlatform : ' Any CPU'
10
+ buildVersion : ' 6.0.$(Build.BuildId)'
11
+
12
+ pool :
13
+ vmImage : ' windows-2019'
14
+ strategy :
15
+ matrix :
16
+ Config_Release :
17
+ buildConfiguration : ' Release'
18
+ Config_Debug :
19
+ buildConfiguration : ' Debug'
20
+
21
+ steps :
22
+ - task : NuGetToolInstaller@1
23
+
24
+ - task : NuGetCommand@2
25
+ inputs :
26
+ restoreSolution : ' $(solution)'
27
+
28
+ - task : Assembly-Info-NetCore@2
29
+ inputs :
30
+ Path : ' $(Build.SourcesDirectory)'
31
+ FileNames : ' **/ICSharpCode.AvalonEdit.csproj'
32
+ InsertAttributes : false
33
+ FileEncoding : ' auto'
34
+ WriteBOM : false
35
+ VersionNumber : ' $(buildVersion)'
36
+ FileVersionNumber : ' $(buildVersion)'
37
+ PackageVersion : ' $(buildVersion)'
38
+
39
+ - task : VSBuild@1
40
+ inputs :
41
+ solution : ' $(solution)'
42
+ msbuildArgs : ' '
43
+ platform : ' $(buildPlatform)'
44
+ configuration : ' $(buildConfiguration)'
45
+
46
+ - task : VSTest@2
47
+ inputs :
48
+ platform : ' $(buildPlatform)'
49
+ configuration : ' $(buildConfiguration)'
50
+
51
+ - script : python BuildTools\tidy.py
52
+ displayName : Tab check
53
+
54
+ - task : DotNetCoreCLI@2
55
+ inputs :
56
+ command : ' pack'
57
+ packagesToPack : ' **/ICSharpCode.AvalonEdit.csproj'
58
+ includesymbols : true
59
+ versioningScheme : ' off'
60
+
61
+ - task : CopyFiles@2
62
+ displayName : Move to publish directory
63
+ inputs :
64
+ contents : |
65
+ **\*.nupkg
66
+ targetFolder : $(Build.ArtifactStagingDirectory)
67
+ condition : and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))
68
+
69
+ - task : PublishPipelineArtifact@0
70
+ displayName : Publish $(BuildConfiguration)
71
+ inputs :
72
+ targetPath : $(Build.ArtifactStagingDirectory)
73
+ condition : and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))
0 commit comments