Move Windows build scripts under script/
This commit is contained in:
parent
732b3ddbe3
commit
7edde9306a
4 changed files with 14 additions and 5 deletions
8
.github/workflows/releases.yml
vendored
8
.github/workflows/releases.yml
vendored
|
|
@ -49,14 +49,16 @@ jobs:
|
|||
with:
|
||||
exe: ${{ steps.download_exe.outputs.exe }}
|
||||
- name: Obtain signing cert
|
||||
id: obtain_cert
|
||||
env:
|
||||
DESKTOP_CERT_TOKEN: ${{ secrets.DESKTOP_CERT_TOKEN }}
|
||||
run: .\setup-windows-certificate.ps1
|
||||
shell: powershell
|
||||
run: .\script\setup-windows-certificate.ps1
|
||||
- name: Sign MSI
|
||||
env:
|
||||
GITHUB_CERT_PASSWORD: ${{ secrets.GITHUB_CERT_PASSWORD }}
|
||||
run: .\sign.ps1 -Certificate "windows-certificate.pfx" -Executable "${{ steps.buildmsi.outputs.msi }}"
|
||||
run: |
|
||||
.\script\sign.ps1 -Certificate "${{ steps.obtain_cert.outputs.cert-file }}" `
|
||||
-Executable "${{ steps.buildmsi.outputs.msi }}"
|
||||
- name: Upload MSI
|
||||
uses: ./.github/actions/upload-msi
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
$certFile = "$scriptPath\windows-certificate.pfx"
|
||||
|
||||
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
|
||||
$headers.Add("Authorization", "token $env:DESKTOP_CERT_TOKEN")
|
||||
|
|
@ -6,4 +7,6 @@ $headers.Add("Accept", 'application/vnd.github.v3.raw')
|
|||
|
||||
Invoke-WebRequest 'https://api.github.com/repos/desktop/desktop-secrets/contents/windows-certificate.pfx' `
|
||||
-Headers $headers `
|
||||
-OutFile "$scriptPath\windows-certificate.pfx"
|
||||
-OutFile "$certFile"
|
||||
|
||||
Write-Output "::set-output name=cert-file::$certFile"
|
||||
|
|
@ -10,4 +10,8 @@ $thumbprint = "fb713a60a7fa79dfc03cb301ca05d4e8c1bdd431"
|
|||
$passwd = $env:GITHUB_CERT_PASSWORD
|
||||
$ProgramName = "GitHub CLI"
|
||||
|
||||
& .\signtool.exe sign /d $ProgramName /f $Certificate /p $passwd /sha1 $thumbprint /fd sha256 /tr http://timestamp.digicert.com /td sha256 /v $Executable
|
||||
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
|
||||
& $scriptPath\signtool.exe sign /d $ProgramName /f $Certificate /p $passwd `
|
||||
/sha1 $thumbprint /fd sha256 /tr http://timestamp.digicert.com /td sha256 /v `
|
||||
$Executable
|
||||
Loading…
Add table
Add a link
Reference in a new issue