@@ -52,7 +52,10 @@ extends:
52
52
- pwsh : |
53
53
[xml]$xml = Get-Content PowerShellEditorServices.Common.props
54
54
$version = $xml.Project.PropertyGroup.VersionPrefix
55
+ $prerelease = $xml.Project.PropertyGroup.VersionSuffix
56
+ if ($prerelease) { $version += "-$prerelease" }
55
57
Write-Output "##vso[task.setvariable variable=version;isOutput=true]$version"
58
+ Write-Output "##vso[task.setvariable variable=prerelease;isOutput=true]$(-not [string]::IsNullOrEmpty($prerelease))"
56
59
name: package
57
60
displayName: Get version from project properties
58
61
- task : onebranch.pipeline.version@1
@@ -61,17 +64,17 @@ extends:
61
64
system : Custom
62
65
customVersion : $(package.version)
63
66
- task : UseDotNet@2
64
- displayName : Install .NET 8.x SDK
67
+ displayName : Use .NET 8.x SDK
65
68
inputs :
66
69
packageType : sdk
67
70
version : 8.x
68
71
- task : UseDotNet@2
69
- displayName : Install .NET 7.x runtime
72
+ displayName : Use .NET 7.x runtime (for tests)
70
73
inputs :
71
74
packageType : runtime
72
75
version : 7.x
73
76
- task : UseDotNet@2
74
- displayName : Install .NET 6.x runtime
77
+ displayName : Use .NET 6.x runtime (for tests)
75
78
inputs :
76
79
packageType : runtime
77
80
version : 6.x
@@ -80,29 +83,21 @@ extends:
80
83
inputs :
81
84
pwsh : true
82
85
filePath : tools/installPSResources.ps1
83
- - task : PowerShell@2
86
+ - pwsh : Invoke-Build TestFull -Configuration $(BuildConfiguration)
84
87
displayName : Build and test
85
- inputs :
86
- targetType : inline
87
- pwsh : true
88
- script : Invoke-Build TestFull -Configuration $(BuildConfiguration)
89
88
- task : PublishTestResults@2
90
89
displayName : Publish test results
91
90
inputs :
92
91
testRunner : VSTest
93
92
testResultsFiles : ' **/*.trx'
94
93
failTaskOnFailedTests : true
95
- - task : PowerShell@2
94
+ - pwsh : |
95
+ $assembly = [Reflection.Assembly]::LoadFile("$(Build.SourcesDirectory)/module/PowerShellEditorServices/bin/Core/Microsoft.PowerShell.EditorServices.Hosting.dll")
96
+ if ($assembly.GetCustomAttributes([System.Diagnostics.DebuggableAttribute], $true).IsJITOptimizerDisabled) {
97
+ Write-Host "##vso[task.LogIssue type=error;]Was not built in release configuration!"
98
+ exit 1
99
+ }
96
100
displayName: Assert release configuration
97
- inputs :
98
- targetType : inline
99
- pwsh : true
100
- script : |
101
- $assembly = [Reflection.Assembly]::LoadFile("$(Build.SourcesDirectory)/module/PowerShellEditorServices/bin/Core/Microsoft.PowerShell.EditorServices.Hosting.dll")
102
- if ($assembly.GetCustomAttributes([System.Diagnostics.DebuggableAttribute], $true).IsJITOptimizerDisabled) {
103
- Write-Host "##vso[task.LogIssue type=error;]Was not built in release configuration!"
104
- exit 1
105
- }
106
101
- task : onebranch.pipeline.signing@1
107
102
displayName : Sign 1st-party files
108
103
inputs :
@@ -136,6 +131,7 @@ extends:
136
131
dependsOn : build
137
132
variables :
138
133
version : $[ stageDependencies.build.main.outputs['package.version'] ]
134
+ prerelease : $[ stageDependencies.build.main.outputs['package.prerelease'] ]
139
135
drop : $(Pipeline.Workspace)/drop_build_main
140
136
jobs :
141
137
- job : validation
@@ -176,7 +172,7 @@ extends:
176
172
tagSource : userSpecifiedTag
177
173
tag : v$(version)
178
174
isDraft : true
175
+ isPreRelease : $(prerelease)
179
176
addChangeLog : false
180
177
releaseNotesSource : inline
181
- releaseNotesInline : |
182
- # TODO: Generate release notes on GitHub!
178
+ releaseNotesInline : " <!-- TODO: Generate release notes on GitHub! -->"
0 commit comments