@@ -63,7 +63,7 @@ extends:
63
63
displayName : Use .NET 6.x SDK
64
64
inputs :
65
65
packageType : sdk
66
- version : 6.x
66
+ useGlobalJson : true
67
67
- task : PowerShell@2
68
68
displayName : Install PSResources
69
69
inputs :
@@ -75,20 +75,29 @@ extends:
75
75
displayName : Sign 1st-party files
76
76
inputs :
77
77
command : sign
78
- signing_environment : external_distribution
78
+ signing_profile : external_distribution
79
79
search_root : $(Build.SourcesDirectory)/module
80
80
files_to_sign : |
81
- **/* .psd1;
82
- **/ Microsoft.PowerShell.*.dll;
81
+ *.psd1;
82
+ Microsoft.PowerShell.*.dll;
83
83
- task : onebranch.pipeline.signing@1
84
84
displayName : Sign 3rd-party files
85
85
inputs :
86
86
command : sign
87
- signing_environment : 135020002
87
+ signing_profile : 135020002
88
88
search_root : $(Build.SourcesDirectory)/module
89
89
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"
92
101
- stage : release
93
102
dependsOn : build
94
103
variables :
@@ -104,19 +113,12 @@ extends:
104
113
steps :
105
114
- download : current
106
115
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
114
116
- task : GitHubRelease@1
115
117
displayName : Create GitHub release
116
118
inputs :
117
119
gitHubConnection : GitHub
118
120
repositoryName : PowerShell/ConsoleGuiTools
119
- assets : out/ConsoleGuiTools.zip
121
+ assets : $(drop)/*.nupkg
120
122
tagSource : userSpecifiedTag
121
123
tag : v$(version)
122
124
isDraft : true
@@ -135,10 +137,10 @@ extends:
135
137
notifyUsers : $(Build.RequestedForEmail)
136
138
instructions : Please validate the release and then publish it!
137
139
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
143
141
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