From 1c0e568db45a1645e403c194f2be11ef88400930 Mon Sep 17 00:00:00 2001 From: Balazs Perlaki-Horvath Date: Fri, 10 Jan 2025 03:06:43 +0100 Subject: [PATCH] Fix CD for macOS --- .github/actions/xcbuild/action.yml | 3 --- .github/workflows/cd.yml | 16 +++++++++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/actions/xcbuild/action.yml b/.github/actions/xcbuild/action.yml index 0facc0bae..c2a774ecc 100644 --- a/.github/actions/xcbuild/action.yml +++ b/.github/actions/xcbuild/action.yml @@ -25,9 +25,6 @@ inputs: KEYCHAIN_PASSWORD: required: false default: mysecretpassword - KEYCHAIN_PROFILE: - required: false - default: build-profile XC_WORKSPACE: required: false default: Kiwix.xcodeproj/project.xcworkspace/ diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 74d0e1ab4..30432f634 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -9,6 +9,12 @@ name: CD # |-----------------|---------|------------------------|----------------|---------------------| # | UPLOAD_FOLDER | nightly | - | - | release/kiwix-macos | # |-----------------|---------|------------------------|----------------|---------------------| + +# Signing certificates: +# - iOS/macOS + app-store: Apple Distribution +# - iOS + FTP: Apple Development +# - macOS + FTP: Developer ID + on: schedule: - cron: '32 1 * * *' # Nightly download.kiwix.org @ 01:32 @@ -52,6 +58,11 @@ jobs: - name: Install python dependencies run: pip install pyyaml==6.0.1 + # https://developer.apple.com/help/account/reference/supported-capabilities-macos + - name: Remove In App Purchase capability for macOS FTP (Developer ID signing) + if: matrix.platform == 'macOS' && matrix.destination == 'ftp' + run: sed -i '' '/in-app-payments/d' project.yml + - name: Set VERSION from code shell: python run: | @@ -111,8 +122,8 @@ jobs: if: matrix.platform == 'iOS' && contains(env.UPLOAD_TO, matrix.destination) run: echo "EXTRA_XCODEBUILD=-sdk iphoneos ${{ env.APPLE_AUTH_PARAMS }}" >> $GITHUB_ENV - - name: Set EXTRA_XCODEBUILD for macOS AppStore - if: matrix.platform == 'macOS' && matrix.destination == 'app-store' + - name: Set macOS extra xcode params + if: matrix.platform == 'macOS' && contains(env.UPLOAD_TO, matrix.destination) run: echo "EXTRA_XCODEBUILD=${{ env.APPLE_AUTH_PARAMS }}" >> $GITHUB_ENV - name: Set macOS FTP export method, and Developer ID Certificate @@ -150,7 +161,6 @@ jobs: DEPLOYMENT_SIGNING_CERTIFICATE_P12_PASSWORD: ${{ env.SIGNING_CERTIFICATE_P12_PASSWORD }} KEYCHAIN: ${{ env.KEYCHAIN }} KEYCHAIN_PASSWORD: ${{ env.KEYCHAIN_PASSWORD }} - KEYCHAIN_PROFILE: ${{ env.KEYCHAIN_PROFILE }} EXTRA_XCODEBUILD: ${{ env.EXTRA_XCODEBUILD }} - name: Add altool credentials to Keychain