Skip to content

Apple signing KEYCHAIN_PASSWORD value #3612

@setoelkahfi

Description

@setoelkahfi

It's been a while since I looked at our GH release since I mostly focused on app stores distribution. Now, I'm moving my app to using organizational account from my personal account. It's known to be working with my personal developer account, now my " Verify Certificate" failed.

Run CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application")
  CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application")
  CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}')
  echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV
  echo "Certificate imported."
  shell: /bin/bash -e {0}
  env:
    APPLE_ID: ***
    APPLE_ID_PASSWORD: ***
    PNPM_HOME: /Users/runner/setup-pnpm/node_modules/.bin
    PATH: /Users/runner/setup-pnpm/node_modules/.bin:/Users/runner/hostedtoolcache/node/20.19.5/arm64/bin:/Users/runner/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.dotnet/tools
    CARGO_HOME: /Users/runner/.cargo
    CARGO_INCREMENTAL: 0
    CARGO_TERM_COLOR: always
Error: Process completed with exit code 1.

workflow file:

name: "Deploy SplitFire AI Desktop"

on:
  push:
    branches:
      - release/splitfire-desktop
  workflow_dispatch:

# This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release.
defaults:
  run:
    working-directory: frontend/splitfire-desktop

jobs:
  publish-tauri:
    permissions:
      contents: write
    strategy:
      fail-fast: false
      matrix:
        include:
          - platform: "macos-latest" # for Arm based macs (M1 and above).
            args: "--target aarch64-apple-darwin -c src-tauri/tauri.prod-macos.conf.json"
          - platform: "macos-latest" # for Intel based macs.
            args: "--target x86_64-apple-darwin -c src-tauri/tauri.prod-macos.conf.json"
          - platform: "ubuntu-22.04"
            args: "-c src-tauri/tauri.prod.conf.json"
          - platform: "windows-latest"
            args: "-c src-tauri/tauri.prod.conf.json"

    runs-on: ${{ matrix.platform }}
    env:
      APPLE_ID: ${{ secrets.APPLE_ID }}
      APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
    steps:
      - uses: actions/checkout@v4
        with:
          lfs: true

      - name: setup node
        uses: actions/setup-node@v4
        with:
          node-version-file: frontend/splitfire-desktop/.nvmrc
      - uses: pnpm/action-setup@v4
        with:
          version: 10
      - name: Setup Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.3.4
      - name: Install Rust stable
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: 1.90
          # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
          targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

      - name: Install Ubuntu dependencies
        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 libasound2-dev libudev-dev

      - name: Import Apple Developer Certificate
        if: matrix.platform == 'macos-latest'
        uses: apple-actions/import-codesign-certs@v3
        with:
          p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
          p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
          keychain: build
      - name: Verify Certificate
        if: matrix.platform == 'macos-latest'
        run: |
          CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application")
          CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}')
          echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV
          echo "Certificate imported."
      - name: Create .p8 file
        run: |
            mkdir -p ~/.appstoreconnect/private_keys
            echo "${{ secrets.APPLE_API_KEY_STRING }}" > ~/.appstoreconnect/private_keys/AuthKey_${{ secrets.APPLE_API_KEY }}.p8
      - name: Install frontend dependencies
        run: pnpm install

      - uses: tauri-apps/tauri-action@v0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
          APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
          APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }}
          APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
          APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
        with:
          projectPath: frontend/splitfire-desktop
          tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
          releaseName: "SplitFire AI v__VERSION__"
          releaseBody: "See the assets to download this version and install."
          releaseDraft: true
          prerelease: false
          args: ${{ matrix.args }}

I updated the APPLE_CERTIFICATE, APPLE_CERTIFICATE_PASSWORD, APPLE_API_ISSUER, APPLE_API_KEY, APPLE_ID and APPLE_ID_PASSWORD to using my organizational account. But I don't know that the KEYCHAIN_PASSWORD should be. It couldn't be my MacBook keychain access password, right?

In this docs, what's the value of the KEYCHAIN_PASSWORD? Or could it be some other issues? Any clue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🪵 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions