From d1782135ee97f772012e0d79b6a0368f4a4140fb Mon Sep 17 00:00:00 2001 From: moughxyz Date: Fri, 11 Oct 2024 13:59:42 -0500 Subject: [PATCH] chore(ci): correct keypair alias [skip e2e] --- .github/workflows/desktop.release.reuse.yml | 10 ++-------- packages/desktop/scripts/windowsSign.js | 4 +++- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/desktop.release.reuse.yml b/.github/workflows/desktop.release.reuse.yml index c8c7063b1..465bb8635 100644 --- a/.github/workflows/desktop.release.reuse.yml +++ b/.github/workflows/desktop.release.reuse.yml @@ -248,6 +248,8 @@ jobs: Windows: runs-on: windows-latest + env: + SM_KEYPAIR_ALIAS: ${{ secrets.SM_KEYPAIR_ALIAS }} defaults: run: @@ -294,14 +296,6 @@ jobs: run: | export DEBUG='electron-builder' - echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT - echo "KEYPAIR_NAME=snkeypair" >> $GITHUB_OUTPUT - echo "CERTIFICATE_NAME=sncertificate" >> $GITHUB_OUTPUT - - echo "::set-output name=version::${GITHUB_REF#refs/tags/v}" - echo "::set-output name=KEYPAIR_NAME::snkeypair" - echo "::set-output name=CERTIFICATE_NAME::sncertificate" - echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV" echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV" echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV" diff --git a/packages/desktop/scripts/windowsSign.js b/packages/desktop/scripts/windowsSign.js index 51a0c550e..e090f39f1 100644 --- a/packages/desktop/scripts/windowsSign.js +++ b/packages/desktop/scripts/windowsSign.js @@ -1,7 +1,9 @@ exports.default = async function (configuration) { if (configuration.path) { + const keypairAlias = process.env.SM_KEYPAIR_ALIAS + require('child_process').execSync( - `smctl sign --keypair-alias=snkeypair --input "${String(configuration.path)}" --verbose`, + `smctl sign --keypair-alias="${keypairAlias}" --input "${String(configuration.path)}" --verbose`, { stdio: 'inherit', },