File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 uses : actions/setup-go@v1
1313 with :
1414 go-version : 1.13
15- id : go
1615
1716 - name : Check out code into the Go module directory
1817 uses : actions/checkout@v1
Original file line number Diff line number Diff line change 1212 - name : Checkout
1313 uses : actions/checkout@v1
1414 - name : Set up Go 1.13
15- id : go
1615 uses : actions/setup-go@v1
1716 with :
1817 go-version : 1.13
3433 - name : Checkout
3534 uses : actions/checkout@v1
3635 - name : Set up Go 1.13
37- id : go
3836 uses : actions/setup-go@v1
3937 with :
4038 go-version : 1.13
@@ -51,14 +49,16 @@ jobs:
5149 with :
5250 exe : ${{ steps.download_exe.outputs.exe }}
5351 - name : Obtain signing cert
52+ id : obtain_cert
5453 env :
5554 DESKTOP_CERT_TOKEN : ${{ secrets.DESKTOP_CERT_TOKEN }}
56- run : .\setup-windows-certificate.ps1
57- shell : powershell
55+ run : .\script\setup-windows-certificate.ps1
5856 - name : Sign MSI
5957 env :
6058 GITHUB_CERT_PASSWORD : ${{ secrets.GITHUB_CERT_PASSWORD }}
61- 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 }}"
6262 - name : Upload MSI
6363 uses : ./.github/actions/upload-msi
6464 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