github-desktop/script/setup-windows-certificate.ps1

10 lines
471 B
PowerShell

$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "token $env:DESKTOPBOT_TOKEN")
$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"