Skip to content

use Apple Development for ipa #111

use Apple Development for ipa

use Apple Development for ipa #111

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
- cd
env:
APPLE_STORE_AUTH_KEY_PATH: /tmp/authkey.p8
jobs:
build:
runs-on: macos-13
strategy:
fail-fast: false
matrix:
destination:
- platform: macOS
- platform: iOS
xcode_extra: -sdk iphoneos
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Add Apple Store Key
if: ${{ matrix.destination.platform == 'iOS' }}
env:
APPLE_STORE_AUTH_KEY_PATH: ${{ env.APPLE_STORE_AUTH_KEY_PATH }}
APPLE_STORE_AUTH_KEY: ${{ secrets.APPLE_STORE_AUTH_KEY }}
shell: bash
run: echo "${APPLE_STORE_AUTH_KEY}" | base64 --decode -o $APPLE_STORE_AUTH_KEY_PATH
- name: Extend EXTRA_XCODEBUILD
if: ${{ matrix.destination.platform == 'iOS' }}
env:
EXTRA_XCODEBUILD: ${{ matrix.destination.xcode_extra }}
APPLE_STORE_AUTH_KEY_PATH: ${{ env.APPLE_STORE_AUTH_KEY_PATH }}
APPLE_STORE_AUTH_KEY_ID: ${{ secrets.APPLE_STORE_AUTH_KEY_ID }}
APPLE_STORE_AUTH_KEY_ISSUER_ID: ${{ secrets.APPLE_STORE_AUTH_KEY_ISSUER_ID }}
shell: python
run: |
import os
extra_xcode = os.getenv("EXTRA_XCODEBUILD", "")
extra_xcode += f" -authenticationKeyPath {os.getenv('APPLE_STORE_AUTH_KEY_PATH')}"
extra_xcode += f" -authenticationKeyID {os.getenv('APPLE_STORE_AUTH_KEY_ID')}"
extra_xcode += f" -authenticationKeyIssuerID {os.getenv('APPLE_STORE_AUTH_KEY_ISSUER_ID')}"
with open(os.getenv("GITHUB_ENV"), "a") as fh:
fh.write(f"EXTRA_XCODEBUILD={extra_xcode}\n")
- name: Build
uses: ./.github/actions/xcbuild
with:
action: build
xc-destination: generic/platform=${{ matrix.destination.platform }}
upload-to: dev
libkiwix-version: "13.0.0"
version: CI
APPLE_DEVELOPMENT_SIGNING_CERTIFICATE: ${{ secrets.APPLE_DEVELOPMENT_SIGNING_CERTIFICATE }}
APPLE_DEVELOPMENT_SIGNING_P12_PASSWORD: ${{ secrets.APPLE_DEVELOPMENT_SIGNING_P12_PASSWORD }}
EXTRA_XCODEBUILD: ${{ env.EXTRA_XCODEBUILD }}