@@ -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,22 @@ 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
- }
101
+ continueOnError: true
106
102
- task : onebranch.pipeline.signing@1
107
103
displayName : Sign 1st-party files
108
104
inputs :
@@ -136,22 +132,10 @@ extends:
136
132
dependsOn : build
137
133
variables :
138
134
version : $[ stageDependencies.build.main.outputs['package.version'] ]
135
+ prerelease : $[ stageDependencies.build.main.outputs['package.prerelease'] ]
139
136
drop : $(Pipeline.Workspace)/drop_build_main
140
137
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
153
138
- job : github
154
- dependsOn : validation
155
139
displayName : Publish draft to GitHub
156
140
pool :
157
141
type : windows
@@ -176,7 +160,7 @@ extends:
176
160
tagSource : userSpecifiedTag
177
161
tag : v$(version)
178
162
isDraft : true
163
+ isPreRelease : $(prerelease)
179
164
addChangeLog : false
180
165
releaseNotesSource : inline
181
- releaseNotesInline : |
182
- # TODO: Generate release notes on GitHub!
166
+ releaseNotesInline : " <!-- TODO: Generate release notes on GitHub! -->"
0 commit comments