@@ -147,4 +147,42 @@ extends:
147
147
$name = $_.Name
148
148
$tmp = (Get-FileHash "$(Build.StagingDirectory)\$name").Hash
149
149
Add-Content $(Build.StagingDirectory)\HASHES.txt "$tmp`t$name"
150
- }
150
+ }
151
+ - task : PowerShell@2
152
+ displayName : Move VS Marketplace Manifest
153
+ inputs :
154
+ targetType : ' inline'
155
+ script : ' mv $env:BUILD_SOURCESDIRECTORY/DevSkim-DotNet/Microsoft.DevSkim.VisualStudio/publish.manifest.json $env:BUILD_STAGINGDIRECTORY/'
156
+ - task : PowerShell@2
157
+ displayName : Move Readme-gallery.md
158
+ inputs :
159
+ targetType : ' inline'
160
+ script : ' mv $env:BUILD_SOURCESDIRECTORY/DevSkim-DotNet/Microsoft.DevSkim.VisualStudio/Content/readme-gallery.md $env:BUILD_STAGINGDIRECTORY/'
161
+
162
+ - task : AzureCLI@2
163
+ displayName : ' Publishing with Managed Identity'
164
+ inputs :
165
+ azureSubscription : oss-vs-marketplace-publish-mi-connection
166
+ scriptType : " pscore"
167
+ scriptLocation : ' inlineScript'
168
+ inlineScript : |
169
+ $aadToken = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
170
+ Install-Module VSSetup -Force
171
+ $vsixPublisher = Join-Path -Path (Get-VSSetupInstance -All | Select-VSSetupInstance -Latest).installationPath -ChildPath "VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" -Resolve
172
+ $vsixPath = Resolve-Path $env:BUILD_STAGINGDIRECTORY\*.vsix -Relative
173
+ & $vsixPublisher publish -payload $vsixPath -publishManifest $(Build.StagingDirectory)/publish.manifest.json -personalAccessToken $aadToken -ignoreWarnings "VSIXValidatorWarning01,VSIXValidatorWarning02,VSIXValidatorWarning08"
174
+ workingDirectory : ' $(Build.StagingDirectory)'
175
+ - task : GitHubRelease@1
176
+ displayName : Release to GitHub
177
+ inputs :
178
+ gitHubConnection : ' github.com_gfs'
179
+ repositoryName : ' microsoft/DevSkim'
180
+ action : ' create'
181
+ target : ' $(Build.SourceVersion)'
182
+ tagSource : ' userSpecifiedTag'
183
+ tag : ' VS_v$(ReleaseVersion)'
184
+ title : ' DevSkim VS Extension v$(ReleaseVersion)'
185
+ assets : |
186
+ $(Build.StagingDirectory)/*.vsix
187
+ changeLogCompareToRelease : ' lastNonDraftRelease'
188
+ changeLogType : ' commitBased'
0 commit comments