@@ -190,6 +190,7 @@ stages:
190190 displayName : Publish distribution artifacts
191191
192192 - job : PostTest
193+ displayName : " Post-build Test"
193194 dependsOn : Build
194195
195196 pool :
@@ -200,7 +201,8 @@ stages:
200201
201202 steps :
202203 - checkout : none
203- - download : dist
204+ - download : current
205+ artifact : dist
204206
205207 - powershell : |
206208 # Ensure we aren't currently installed
@@ -210,21 +212,19 @@ stages:
210212 }
211213 displayName: 'Remove existing PyManager install'
212214
213- - ${{ if eq(parameters.SigningCertificate, 'PythonSoftwareFoundation') }} :
214- - powershell : |
215- $msix = dir "$(DIST_DIR)\*.msix" | ?{ -not ($_.BaseName -match '.+-store') } | select -first 1
215+ - powershell : |
216+ $msix = dir "$(DIST_DIR)\*.msix" | ?{ -not ($_.BaseName -match '.+-store') } | select -first 1
217+ if ((Get-AuthenticodeSignature $msix).Status -eq "Valid") {
216218 Add-AppxPackage $msix
217- displayName: 'Install signed MSIX'
218-
219- - ${{ else }} :
220- - powershell : |
221- $msix = dir "$(DIST_DIR)\*.msix" | ?{ -not ($_.BaseName -match '.+-store') } | select -first 1
219+ } else {
222220 cp $msix "${msix}.zip"
223221 Expand-Archive "${msix}.zip" (mkdir -Force $env:TEST_MSIX)
224222 Add-AppxPackage -Register "${env:TEST_MSIX}\appxmanifest.xml"
225- displayName: 'Register unsigned MSIX'
226- env:
227- TEST_MSIX: $(TEST_MSIX_DIR)
223+ }
224+ displayName: 'Install MSIX'
225+ env:
226+ TEST_MSIX: $(TEST_MSIX_DIR)
227+
228228
229229 - ${{ if eq(parameters.PostTest, 'true') }} :
230230 - powershell : |
@@ -346,11 +346,14 @@ stages:
346346 vmImage : ' windows-latest'
347347
348348 variables :
349- - ${{ if eq(parameters.Publish, 'true') }} :
350- - group : PythonOrgPublish
349+ - group : PythonOrgPublish
350+ - name : DIST_DIR
351+ value : $(Pipeline.Workspace)\dist
351352
352353 steps :
353354 - checkout : self
355+ - download : current
356+ artifact : dist
354357
355358 - task : NugetToolInstaller@0
356359 displayName : ' Install Nuget'
0 commit comments