Skip to content

Commit

Permalink
feat(sign): add pfx base64 method
Browse files Browse the repository at this point in the history
  • Loading branch information
yannouuuu committed Aug 2, 2024
1 parent 8c4a7c6 commit 238b612
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,23 +214,10 @@ jobs:
- name: Sign MSIX package
working-directory: ./zed
run: |
Write-Host "Before signing:"
ls
ls ..
$certPath = "../zed_cert.pfx" # Relative path from working directory (./zed)
Write-Host "Certificate path: $certPath"
if (Test-Path $certPath) {
Write-Host "Certificate file exists."
} else {
Write-Host "Certificate file does not exist."
exit 1
}
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /fd SHA256 /a /f "$certPath" /p "${{ secrets.CERTIFICATE_PASSWORD }}" "Zed-windows-amd64-$env:LATEST_TAG.msix"
Write-Host "After signing:"
ls
ls ..
$pfxBytes = [System.Convert]::FromBase64String("${{ secrets.CERTIFICATE_BASE64 }}")
Set-Content -Path "zed_cert.pfx" -Value $pfxBytes -Encoding Byte
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /fd SHA256 /a /f "zed_cert.pfx" /p "${{ secrets.CERTIFICATE_PASSWORD }}" "Zed-windows-amd64-$env:LATEST_TAG.msix"
- name: Create MSIX package
run: |
Expand Down

0 comments on commit 238b612

Please sign in to comment.