@@ -32,9 +32,12 @@ extends:
3232 WindowsHostVersion : ' 1ESWindows2022'
3333 globalSdl :
3434 disableLegacyManifest : true
35+ cg : # Component Governance parameters. Ignore test components.
36+ ignoreDirectories : $(Build.SourcesDirectory)\PSReadLine\MockPSConsole,$(Build.SourcesDirectory)\PSReadLine\test
3537 sbom :
3638 enabled : true
3739 packageName : PSReadLine
40+ buildComponentPath : $(Build.SourcesDirectory)\PSReadLine\PSReadLine
3841 codeql :
3942 compiled :
4043 enabled : true
@@ -43,7 +46,7 @@ extends:
4346 forStages : [Build]
4447 credscan :
4548 enabled : true
46- scanFolder : $(Build.SourcesDirectory)\PSReadLine\PSReadLine
49+ scanFolder : $(Build.SourcesDirectory)\PSReadLine\PSReadLine
4750 binskim :
4851 enabled : true
4952 apiscan :
@@ -235,3 +238,59 @@ extends:
235238 SourceFolder : $(nugetPath)
236239 Contents : ' **\*'
237240 TargetFolder : $(ob_outputDirectory)
241+
242+ - stage : release
243+ dependsOn : buildstage
244+ displayName : Release PSReadLine
245+
246+ jobs :
247+ - job : validation
248+ displayName : Manual validation
249+ pool :
250+ type : agentless
251+ timeoutInMinutes : 1440
252+
253+ steps :
254+ - task : ManualValidation@0
255+ displayName : Wait 24 hours for validation
256+ inputs :
257+ instructions : Please validate the release
258+ timeoutInMinutes : 1440
259+
260+ - job : publish
261+ dependsOn : validation
262+ displayName : Publish to AzFeed and PSGallery
263+ variables :
264+ - name : ob_outputDirectory
265+ value : ' $(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
266+ - name : nugetPath
267+ value : $(Pipeline.Workspace)\NuGetPackage
268+ pool :
269+ type : windows
270+
271+ steps :
272+ - task : DownloadPipelineArtifact@2
273+ displayName : ' Download nupkg artifact'
274+ inputs :
275+ targetPath : $(nugetPath)
276+ artifact : drop_buildstage_nupkg
277+
278+ - pwsh : |
279+ Get-ChildItem $(nugetPath) -Recurse
280+ displayName: Find signed Nupkg
281+
282+ - task : NuGetCommand@2
283+ displayName : Push PSReadLine module to Azure feed
284+ inputs :
285+ command : push
286+ packagesToPush : $(nugetPath)\PSReadLine.*.nupkg
287+ nuGetFeedType : internal
288+ publishVstsFeed : AzArtifactsFeed
289+
290+ - task : NuGetCommand@2
291+ displayName : Push PSReadLine module to PSGallery feed
292+ inputs :
293+ command : push
294+ packagesToPush : $(nugetPath)\PSReadLine.*.nupkg
295+ nuGetFeedType : external
296+ publishFeedCredentials : PowerShellGalleryFeed
0 commit comments