Skip to content

Commit b895f29

Browse files
committed
Fix macOS installer pkg file signing
Manually zip the unsigned package file before sending it off for signing as there appears to be a problem with the signing task's logic for doing this itself.
1 parent 0c5f913 commit b895f29

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.azure-pipelines/templates/osx/pack.signed/step4-signpack.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,25 @@ steps:
1111
artifactName: 'tmp.macpkg_unsigned'
1212
downloadPath: '$(Build.StagingDirectory)\pkg'
1313

14+
- powershell: |
15+
$dir="$(Build.StagingDirectory)\pkg"
16+
Compress-Archive -Path $dir\*.pkg $dir\gcmcorepkg.zip
17+
Remove-Item $dir\*.pkg
18+
displayName: 'Zip package file for signing'
19+
1420
- task: ms-vseng.MicroBuildTasks.7973a23b-33e3-4b00-a7d9-c06d90f8297f.MicroBuildSignMacFiles@1
1521
displayName: Sign package
1622
inputs:
17-
SigningTarget: '$(Build.StagingDirectory)\pkg'
23+
SigningTarget: '$(Build.StagingDirectory)\pkg\gcmcorepkg.zip'
1824
SigningCert: 8003
1925
condition: and(succeeded(), ne(variables['SignType'], 'test'))
2026

27+
- powershell: |
28+
$dir="$(Build.StagingDirectory)\pkg"
29+
Expand-Archive -LiteralPath $dir\gcmcorepkg.zip -DestinationPath $dir -Force
30+
Remove-Item $dir\gcmcorepkg.zip -Force
31+
displayName: 'Unzip signed package file'
32+
2133
- task: DownloadPipelineArtifact@1
2234
displayName: Download signed payload
2335
inputs:

0 commit comments

Comments
 (0)