Migrate to osslsigncode.
This commit is contained in:
parent
e56c78a364
commit
45adc4ad76
2 changed files with 13 additions and 13 deletions
2
.github/workflows/releases.yml
vendored
2
.github/workflows/releases.yml
vendored
|
|
@ -25,6 +25,8 @@ jobs:
|
|||
-q .body > CHANGELOG.md
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
- name: Install osslsigncode
|
||||
run: sudo apt-get install -y osslsigncode
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -9,20 +9,18 @@ curl \
|
|||
--output windows-certificate.pfx \
|
||||
https://api.github.com/repos/desktop/desktop-secrets/contents/windows-certificate.pfx
|
||||
|
||||
PROGRAM_NAME="GitHub CLI"
|
||||
|
||||
# Convert private key to the expected format
|
||||
openssl pkcs12 -in windows-certificate.pfx -nocerts -nodes -out private-key.pem -passin pass:${GITHUB_CERT_PASSWORD}
|
||||
openssl rsa -in private-key.pem -outform PVK -pvk-none -out private-key.pvk
|
||||
|
||||
# Convert certificate chain into the expected format
|
||||
openssl pkcs12 -in windows-certificate.pfx -nokeys -nodes -out certificate.pem -passin pass:${GITHUB_CERT_PASSWORD}
|
||||
openssl crl2pkcs7 -nocrl -certfile certificate.pem -outform DER -out certificate.spc
|
||||
|
||||
signcode \
|
||||
-spc certificate.spc \
|
||||
-v private-key.pvk \
|
||||
-n $PROGRAM_NAME \
|
||||
osslsigncode sign \
|
||||
-certs certificate.pem \
|
||||
-key private-key.pem \
|
||||
-n "GitHub CLI" \
|
||||
-t http://timestamp.digicert.com \
|
||||
-a sha256 \
|
||||
$EXECUTABLE_PATH
|
||||
-in $EXECUTABLE_PATH \
|
||||
-out gh_signed.exe
|
||||
|
||||
# Oddly, there can be a delay before the file is *actually* available - wait for it
|
||||
while [ ! -f gh_signed.exe ]; do sleep 1; done;
|
||||
|
||||
mv gh_signed.exe $EXECUTABLE_PATH
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue