From 2bbfde977085e98f0e4bf1379f4617ce3652d2f0 Mon Sep 17 00:00:00 2001 From: Gianluca Brigandi Date: Fri, 5 Dec 2025 16:20:58 -0800 Subject: [PATCH] Make macOS code signing optional when secrets not configured Skip signing and notarization steps if Apple secrets are not set, allowing the release workflow to succeed without code signing. --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 08ed377..3733510 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,7 +101,7 @@ jobs: fi - name: Import Apple Certificate (macOS only) - if: matrix.os == 'macos-latest' || matrix.os == 'macos-14' + if: ${{ (matrix.os == 'macos-latest' || matrix.os == 'macos-14') && secrets.APPLE_CERTIFICATE_BASE64 != '' }} env: APPLE_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }} APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} @@ -136,7 +136,7 @@ jobs: rm certificate.p12 DeveloperIDG2CA.cer AppleWWDRCAG3.cer - name: Code Sign Binary (macOS only) - if: matrix.os == 'macos-latest' || matrix.os == 'macos-14' + if: ${{ (matrix.os == 'macos-latest' || matrix.os == 'macos-14') && secrets.APPLE_CERTIFICATE_BASE64 != '' }} env: APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} run: | @@ -155,7 +155,7 @@ jobs: /usr/bin/codesign --verify --verbose ./target/${{ matrix.target }}/release/${{ matrix.output_name }} - name: Notarize Binary (macOS only) - if: matrix.os == 'macos-latest' || matrix.os == 'macos-14' + if: ${{ (matrix.os == 'macos-latest' || matrix.os == 'macos-14') && secrets.APPLE_API_KEY_BASE64 != '' }} env: APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }} APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}