@@ -63,7 +63,7 @@ extends:
6363 displayName : Use .NET 6.x SDK
6464 inputs :
6565 packageType : sdk
66- version : 6.x
66+ useGlobalJson : true
6767 - task : PowerShell@2
6868 displayName : Install PSResources
6969 inputs :
@@ -75,20 +75,29 @@ extends:
7575 displayName : Sign 1st-party files
7676 inputs :
7777 command : sign
78- signing_environment : external_distribution
78+ signing_profile : external_distribution
7979 search_root : $(Build.SourcesDirectory)/module
8080 files_to_sign : |
81- **/* .psd1;
82- **/ Microsoft.PowerShell.*.dll;
81+ *.psd1;
82+ Microsoft.PowerShell.*.dll;
8383 - task : onebranch.pipeline.signing@1
8484 displayName : Sign 3rd-party files
8585 inputs :
8686 command : sign
87- signing_environment : 135020002
87+ signing_profile : 135020002
8888 search_root : $(Build.SourcesDirectory)/module
8989 files_to_sign : |
90- **/NStack.dll;
91- **/Terminal.Gui.dll;
90+ NStack.dll;
91+ Terminal.Gui.dll;
92+ - pwsh : Invoke-Build -Configuration $(BuildConfiguration) Package
93+ displayName : Package
94+ - task : onebranch.pipeline.signing@1
95+ displayName : Sign NuGet package
96+ inputs :
97+ command : sign
98+ signing_profile : external_distribution
99+ search_root : $(Build.SourcesDirectory)/out
100+ files_to_sign : " *.nupkg"
92101 - stage : release
93102 dependsOn : build
94103 variables :
@@ -104,19 +113,12 @@ extends:
104113 steps :
105114 - download : current
106115 displayName : Download artifacts
107- - task : ArchiveFiles@2
108- displayName : Zip signed artifacts
109- inputs :
110- rootFolderOrFile : $(drop)
111- includeRootFolder : false
112- archiveType : zip
113- archiveFile : out/ConsoleGuiTools.zip
114116 - task : GitHubRelease@1
115117 displayName : Create GitHub release
116118 inputs :
117119 gitHubConnection : GitHub
118120 repositoryName : PowerShell/ConsoleGuiTools
119- assets : out/ConsoleGuiTools.zip
121+ assets : $(drop)/*.nupkg
120122 tagSource : userSpecifiedTag
121123 tag : v$(version)
122124 isDraft : true
@@ -135,10 +137,10 @@ extends:
135137 notifyUsers : $(Build.RequestedForEmail)
136138 instructions : Please validate the release and then publish it!
137139 timeoutInMinutes : 1440
138- - pwsh : |
139- Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
140- Install-Module -Name Microsoft.PowerShell.PSResourceGet -AllowPrerelease -Scope CurrentUser -Force
141- Import-Module -Name Microsoft.PowerShell.PSResourceGet -MinimumVersion 1.0.0
142- Publish-PSResource -Path $(Pipeline.Workspace)/Publish/Microsoft.PowerShell.ConsoleGuiTools -Repository PSGallery -APIKey $(GalleryToken) -Verbose
140+ - task : NuGetCommand@2
143141 dependsOn : validation
144- displayName: Publishing ConsoleGuiTools to PowerShell Gallery
142+ displayName : Publish ConsoleGuiTools to PowerShell Gallery
143+ inputs :
144+ command : push
145+ packagesToPush : $(drop)/*.nupkg
146+ publishFeedCredentials : PSGet-PSGalleryPush
0 commit comments