File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed
Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -49,14 +49,16 @@ jobs:
4949 with :
5050 exe : ${{ steps.download_exe.outputs.exe }}
5151 - name : Obtain signing cert
52+ id : obtain_cert
5253 env :
5354 DESKTOP_CERT_TOKEN : ${{ secrets.DESKTOP_CERT_TOKEN }}
54- run : .\setup-windows-certificate.ps1
55- shell : powershell
55+ run : .\script\setup-windows-certificate.ps1
5656 - name : Sign MSI
5757 env :
5858 GITHUB_CERT_PASSWORD : ${{ secrets.GITHUB_CERT_PASSWORD }}
59- run : .\sign.ps1 -Certificate "windows-certificate.pfx" -Executable "${{ steps.buildmsi.outputs.msi }}"
59+ run : |
60+ .\script\sign.ps1 -Certificate "${{ steps.obtain_cert.outputs.cert-file }}" `
61+ -Executable "${{ steps.buildmsi.outputs.msi }}"
6062 - name : Upload MSI
6163 uses : ./.github/actions/upload-msi
6264 env :
Original file line number Diff line number Diff line change 11$scriptPath = split-path - parent $MyInvocation.MyCommand.Definition
2+ $certFile = " $scriptPath \windows-certificate.pfx"
23
34$headers = New-Object " System.Collections.Generic.Dictionary[[String],[String]]"
45$headers.Add (" Authorization" , " token $env: DESKTOP_CERT_TOKEN " )
56$headers.Add (" Accept" , ' application/vnd.github.v3.raw' )
67
78Invoke-WebRequest ' https://api.github.com/repos/desktop/desktop-secrets/contents/windows-certificate.pfx' `
89 - Headers $headers `
9- - OutFile " $scriptPath \windows-certificate.pfx"
10+ - OutFile " $certFile "
11+
12+ Write-Output " ::set-output name=cert-file::$certFile "
Original file line number Diff line number Diff line change @@ -10,4 +10,8 @@ $thumbprint = "fb713a60a7fa79dfc03cb301ca05d4e8c1bdd431"
1010$passwd = $env: GITHUB_CERT_PASSWORD
1111$ProgramName = " GitHub CLI"
1212
13- & .\signtool.exe sign / d $ProgramName / f $Certificate / p $passwd / sha1 $thumbprint / fd sha256 / tr http:// timestamp.digicert.com / td sha256 / v $Executable
13+ $scriptPath = split-path - parent $MyInvocation.MyCommand.Definition
14+
15+ & $scriptPath \signtool.exe sign / d $ProgramName / f $Certificate / p $passwd `
16+ / sha1 $thumbprint / fd sha256 / tr http:// timestamp.digicert.com / td sha256 / v `
17+ $Executable
File renamed without changes.
You can’t perform that action at this time.
0 commit comments