From ab828858b685ac1d4d7ea0d23f5c17b6b1819240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8jberg?= Date: Tue, 3 Dec 2024 11:33:14 -0500 Subject: [PATCH] Only run Apple cert steps on macos --- .github/workflows/publish.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dbe9a50..984218e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,19 +28,19 @@ jobs: steps: - uses: actions/checkout@v4 - - name: install dependencies (ubuntu only) + - name: Install dependencies (ubuntu only) if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. run: | sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf - - name: setup node + - name: Setup node uses: actions/setup-node@v4 with: node-version: lts/* cache: 'npm' - - name: install Rust stable + - name: Install Rust stable uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly with: # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. @@ -51,10 +51,11 @@ jobs: with: workspaces: './src-tauri -> target' - - name: install frontend dependencies + - name: Install FrontEnd dependencies run: npm install - name: Import Apple Developer Certificate + if: runner.os == 'macOS' env: APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} @@ -68,7 +69,8 @@ jobs: security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain security find-identity -v -p codesigning build.keychain - - name: Verify Certificate + - name: Verify Apple Certificate + if: runner.os == 'macOS' run: | CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application") CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}')