mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-26 21:39:37 -04:00
Introducing Continuous Integration
Building both macOS App and iOS App on every commit on `main` and on PRs. Build is not used/uploaded but still requires to be signed. Signing is done by automatically requesting appropriate Dev certificate using Store API Key.
This commit is contained in:
parent
001136d59e
commit
9298b978a5
60
.github/workflows/ci.yml
vendored
60
.github/workflows/ci.yml
vendored
@ -8,8 +8,60 @@ on:
|
|||||||
- ci
|
- ci
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
build:
|
||||||
runs-on: ubuntu-22.04
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
destination:
|
||||||
|
- platform: macOS
|
||||||
|
name: Any Mac
|
||||||
|
- platform: iOS
|
||||||
|
name: Any iOS Device
|
||||||
|
runs-on: macos-13
|
||||||
|
env:
|
||||||
|
XCF_URL: https://tmp.kiwix.org/ci/dev_preview/xcframework/libkiwix_xcframework-2023-11-11.tar.gz
|
||||||
|
# XCF_URL: https://download.kiwix.org/nightly/libkiwix_xcframework-2023-11-11.tar.gz
|
||||||
|
XC_PROJECT: Kiwix.xcodeproj
|
||||||
|
XC_SCHEME: Kiwix
|
||||||
|
XC_CONFIG: Release
|
||||||
|
XC_DESTINATION: platform=${{ matrix.destination.platform }},name=${{ matrix.destination.name }}
|
||||||
|
STORE_AUTH_KEY: /tmp/authkey.p8
|
||||||
steps:
|
steps:
|
||||||
- name: Hello
|
- name: Update Apple Intermediate Certificate
|
||||||
run: echo "hello world"
|
run: |
|
||||||
|
curl -L -o ~/Downloads/AppleWWDRCAG3.cer https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer
|
||||||
|
sudo security import ~/Downloads/AppleWWDRCAG3.cer \
|
||||||
|
-k /Library/Keychains/System.keychain \
|
||||||
|
-T /usr/bin/codesign \
|
||||||
|
-T /usr/bin/security \
|
||||||
|
-T /usr/bin/productbuild
|
||||||
|
- name: Set Xcode version (15.0.1)
|
||||||
|
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode
|
||||||
|
run: sudo xcode-select -s /Applications/Xcode_15.0.1.app
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Download CoreKiwix.xcframework
|
||||||
|
run: curl -L -o - $XCF_URL | tar -x --strip-components 2
|
||||||
|
- name: Prepare Xcode
|
||||||
|
run: xcrun xcodebuild -checkFirstLaunchStatus || xcrun xcodebuild -runFirstLaunch
|
||||||
|
- name: Dump build settings
|
||||||
|
run: xcrun xcodebuild -project Kiwix.xcodeproj -scheme Kiwix -showBuildSettings
|
||||||
|
- name: Copy Key file to disk
|
||||||
|
run: echo "%{{ secrets.APPLE_STORE_AUTH_KEY }}" > ${STORE_AUTH_KEY} && chmod 600 ${STORE_AUTH_KEY}
|
||||||
|
- name: Build for ${{ matrix.destination.platform }}/${{ matrix.destination.name }}
|
||||||
|
env:
|
||||||
|
APPLE_STORE_AUTH_KEY_ID: ${{ secrets.APPLE_STORE_AUTH_KEY_ID }}
|
||||||
|
APPLE_STORE_AUTH_KEY_ISSUER_ID: ${{ secrets.APPLE_STORE_AUTH_KEY_ISSUER_ID }}
|
||||||
|
run: xcrun xcodebuild \
|
||||||
|
-project ${XC_PROJECT} \
|
||||||
|
-scheme ${XC_SCHEME} \
|
||||||
|
-destination "${XC_DESTINATION}" \
|
||||||
|
-configuration ${XC_CONFIG} \
|
||||||
|
-onlyUsePackageVersionsFromResolvedFile \
|
||||||
|
-derivedDataPath $PWD/build \
|
||||||
|
-allowProvisioningUpdates \
|
||||||
|
-authenticationKeyPath ${STORE_AUTH_KEY} \
|
||||||
|
-authenticationKeyID ${APPLE_STORE_AUTH_KEY_ID} \
|
||||||
|
-authenticationKeyIssuerID ${APPLE_STORE_AUTH_KEY_ISSUER_ID} \
|
||||||
|
-verbose \
|
||||||
|
build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user