From 1cc7ca044a2b54edd5c53a6076a696ece7f24bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Carden=CC=83a?= <35935591+luisecm@users.noreply.github.com> Date: Tue, 30 Apr 2024 12:05:37 -0600 Subject: [PATCH] chore(appium): try workflow with new variables --- .github/workflows/test-certificate.yml | 47 +++++++++++++++++++++----- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-certificate.yml b/.github/workflows/test-certificate.yml index 08d174eb88..e286bf3899 100644 --- a/.github/workflows/test-certificate.yml +++ b/.github/workflows/test-certificate.yml @@ -13,15 +13,44 @@ jobs: - name: Checkout Directory 🔖 uses: actions/checkout@v4 - - name: Sign Windows Installer - uses: dlemstra/code-sign-action@v1 - with: - certificate: "${{ secrets.SM_CERT_PKFS_BASE64 }}" - password: "${{ secrets.SM_CLIENT_CERT_PASSWORD}}" - folder: "target/wix" - recursive: true - files: | - target/wix/*.msi + - name: Setup Certificate + run: | + echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/cert_676306883.crt + shell: bash + + - name: Set variables + id: variables + run: | + dir + echo "::set-output name=version::${GITHUB_REF#refs/tags/v}" + echo "::set-output name=KEYPAIR_NAME::gt-standard-keypair" + echo "::set-output name=CERTIFICATE_NAME::gt-certificate" + echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV" + echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV" + echo "SM_CLIENT_CERT_FILE=D:\\cert_676306883.crt" >> "$GITHUB_ENV" + echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV" + echo "C:\Program Files (x86)\Windows Kits\10\App Certification Kit" >> $GITHUB_PATH + echo "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools" >> $GITHUB_PATH + echo "C:\Program Files\DigiCert\DigiCert Keylocker Tools" >> $GITHUB_PATH + shell: bash + + - name: Setup Keylocker KSP on windows + run: | + curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/Keylockertools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o Keylockertools-windows-x64.msi + msiexec /i Keylockertools-windows-x64.msi /quiet /qn + smksp_registrar.exe list + smctl.exe keypair ls + C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user + shell: cmd + + - name: Certificates Sync + run: | + smctl windows certsync + shell: cmd + + - name: Signing using Signtool + run: | + signtool.exe sign /debug /sha1 ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }} /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 "./target/wix/*.msi" - name: Verify signing run: signtool.exe verify /v /pa "./target/wix/*.msi"