Skip to content

Update build pipeline to notarize macOS releases #187

Update build pipeline to notarize macOS releases

Update build pipeline to notarize macOS releases #187

Workflow file for this run

name: Apple Build
on:
push:
branches:
- main
pull_request:
branches:
- "*"
jobs:
build:
name: Build (${{ matrix.platform }})
runs-on: macos-13
strategy:
fail-fast: false
matrix:
include:
- scheme: App
destination: generic/platform=iOS
platform: iOS
sdk-name: iphoneos
- scheme: App
destination: platform=iOS Simulator,OS=17.2,name=iPhone 14 Pro
platform: iOS Simulator
sdk-name: iphonesimulator
xcode-unit-test: UnitTests
xcode-ui-test: UITests
gradle-test: iosX64Test
- scheme: App (macOS)
destination: platform=macOS
platform: macOS
sdk-name: macos
xcode-unit-test: UnitTests
xcode-ui-test: UITests-macOS
gradle-test: macosX64Test
env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
submodules: recursive
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: '20'
cache: gradle
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Cache Kotlin Native Compiler
uses: actions/cache@v3
with:
path: ~/.konan
key: ${{ runner.os }}-konan
- name: Import Certificate
uses: ./.github/actions/import-cert
with:
certificate: ${{ secrets.DEVELOPER_CERT }}
password: ${{ secrets.DEVELOPER_CERT_PASSWORD }}
- name: Build External Libraries
shell: bash
run: External/build-darwin.sh ${{ matrix.sdk-name }}
- name: Build
id: build
uses: ./.github/actions/build-for-testing
with:
scheme: ${{ matrix.scheme }}
destination: ${{ matrix.destination }}
app-store-key: ${{ secrets.APPSTORE_KEY }}
app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }}
app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }}
- name: Xcode Unit Test
if: ${{ matrix.xcode-unit-test != '' }}
continue-on-error: true
uses: ./.github/actions/test-without-building
with:
scheme: ${{ matrix.scheme }}
destination: ${{ matrix.destination }}
test-plan: ${{ matrix.xcode-unit-test }}
artifact-prefix: unit-tests-${{ matrix.sdk-name }}
check-name: Xcode Unit Tests (${{ matrix.platform }})
- name: Build Kotlin Tests
if: ${{ matrix.gradle-test != '' }}
shell: bash
run: ./gradlew :Shared:${{ matrix.gradle-test }}Klibrary
- name: Kotlin Unit Test
if: ${{ matrix.gradle-test != '' }}
continue-on-error: true
uses: ./.github/actions/gradle-test
with:
task: :Shared:${{ matrix.gradle-test }}
check-name: Kotlin Tests (${{ matrix.platform }})
- name: Xcode UI Test
if: ${{ matrix.xcode-ui-test != '' }}
continue-on-error: true
uses: ./.github/actions/test-without-building
with:
scheme: ${{ matrix.scheme }}
destination: ${{ matrix.destination }}
test-plan: ${{ matrix.xcode-ui-test }}
artifact-prefix: ui-tests-${{ matrix.sdk-name }}
check-name: Xcode UI Tests (${{ matrix.platform }})