@@ -52,7 +52,10 @@ extends:
5252 - pwsh : |
5353 [xml]$xml = Get-Content PowerShellEditorServices.Common.props
5454 $version = $xml.Project.PropertyGroup.VersionPrefix
55+ $prerelease = $xml.Project.PropertyGroup.VersionSuffix
56+ if ($prerelease) { $version += "-$prerelease" }
5557 Write-Output "##vso[task.setvariable variable=version;isOutput=true]$version"
58+ Write-Output "##vso[task.setvariable variable=prerelease;isOutput=true]$(-not [string]::IsNullOrEmpty($prerelease))"
5659 name: package
5760 displayName: Get version from project properties
5861 - task : onebranch.pipeline.version@1
@@ -61,17 +64,17 @@ extends:
6164 system : Custom
6265 customVersion : $(package.version)
6366 - task : UseDotNet@2
64- displayName : Install .NET 8.x SDK
67+ displayName : Use .NET 8.x SDK
6568 inputs :
6669 packageType : sdk
6770 version : 8.x
6871 - task : UseDotNet@2
69- displayName : Install .NET 7.x runtime
72+ displayName : Use .NET 7.x runtime (for tests)
7073 inputs :
7174 packageType : runtime
7275 version : 7.x
7376 - task : UseDotNet@2
74- displayName : Install .NET 6.x runtime
77+ displayName : Use .NET 6.x runtime (for tests)
7578 inputs :
7679 packageType : runtime
7780 version : 6.x
@@ -80,29 +83,22 @@ extends:
8083 inputs :
8184 pwsh : true
8285 filePath : tools/installPSResources.ps1
83- - task : PowerShell@2
86+ - pwsh : Invoke-Build TestFull -Configuration $(BuildConfiguration)
8487 displayName : Build and test
85- inputs :
86- targetType : inline
87- pwsh : true
88- script : Invoke-Build TestFull -Configuration $(BuildConfiguration)
8988 - task : PublishTestResults@2
9089 displayName : Publish test results
9190 inputs :
9291 testRunner : VSTest
9392 testResultsFiles : ' **/*.trx'
9493 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+ }
96100 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- }
101+ continueOnError: true
106102 - task : onebranch.pipeline.signing@1
107103 displayName : Sign 1st-party files
108104 inputs :
@@ -136,22 +132,10 @@ extends:
136132 dependsOn : build
137133 variables :
138134 version : $[ stageDependencies.build.main.outputs['package.version'] ]
135+ prerelease : $[ stageDependencies.build.main.outputs['package.prerelease'] ]
139136 drop : $(Pipeline.Workspace)/drop_build_main
140137 jobs :
141- - job : validation
142- displayName : Manual validation
143- pool :
144- type : agentless
145- timeoutInMinutes : 1440
146- steps :
147- - task : ManualValidation@0
148- displayName : Wait 24 hours for validation
149- inputs :
150- notifyUsers : $(Build.RequestedForEmail)
151- instructions : Please validate the release
152- timeoutInMinutes : 1440
153138 - job : github
154- dependsOn : validation
155139 displayName : Publish draft to GitHub
156140 pool :
157141 type : windows
@@ -176,7 +160,7 @@ extends:
176160 tagSource : userSpecifiedTag
177161 tag : v$(version)
178162 isDraft : true
163+ isPreRelease : $(prerelease)
179164 addChangeLog : false
180165 releaseNotesSource : inline
181- releaseNotesInline : |
182- # TODO: Generate release notes on GitHub!
166+ releaseNotesInline : " <!-- TODO: Generate release notes on GitHub! -->"
0 commit comments