github.com/abdfnx/gh-api@v0.0.0-20210414084727-f5432eec23b8/script/sign.ps1 (about) 1 param ( 2 [string]$Certificate = $(throw "-Certificate is required."), 3 [string]$Executable = $(throw "-Executable is required.") 4 ) 5 6 Set-StrictMode -Version Latest 7 $ErrorActionPreference = "Stop" 8 9 $thumbprint = "fb713a60a7fa79dfc03cb301ca05d4e8c1bdd431" 10 $passwd = $env:GITHUB_CERT_PASSWORD 11 $ProgramName = "GitHub CLI" 12 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