Files
flutter/.github/workflows/build-apple.yml
2025-09-23 12:39:21 +02:00

90 lines
2.5 KiB
YAML

name: Build Apple
on:
workflow_call:
inputs:
ref:
required: true
type: string
jobs:
build_ios:
name: iOS
runs-on: macos-latest
steps:
- name: Checkout application
uses: actions/checkout@v5
with:
ref: ${{ inputs.ref }}
# This seems to be related to https://github.com/actions/runner-images/issues/12758
# Select appropriate Xcode version from
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md#xcode
- name: Xcode setup
run: |
sudo xcode-select --switch /Applications/Xcode_16.4.app
- name: Common flutter setup
uses: ./.github/actions/flutter-common
- name: Build .app
run: |
flutter build ios --release --no-codesign
cd build/ios/iphoneos
zip -r Runner.app.zip Runner.app
- uses: actions/upload-artifact@v4
with:
name: builds-ios
path: build/ios/iphoneos/Runner.app.zip
build_ipa:
name: IPA
runs-on: macos-latest
steps:
- name: Checkout application
uses: actions/checkout@v5
with:
ref: ${{ inputs.ref }}
- name: Common flutter setup
uses: ./.github/actions/flutter-common
# This seems to be related to https://github.com/actions/runner-images/issues/12758
# Select appropriate Xcode version from
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md#xcode
- name: Xcode setup
run: |
sudo xcode-select --switch /Applications/Xcode_16.4.app
- name: Build .xcarchive
run: |
flutter build ipa --release --no-codesign
cd build/ios/archive
zip -r Runner.xcarchive.zip Runner.xcarchive
- uses: actions/upload-artifact@v4
with:
name: builds-ipa
path: build/ios/archive/Runner.xcarchive.zip
build_macos:
name: macOS
runs-on: macos-latest
steps:
- name: Checkout application
uses: actions/checkout@v5
with:
ref: ${{ inputs.ref }}
- name: Common flutter setup
uses: ./.github/actions/flutter-common
- name: Build .app
run: |
flutter build macos --release
cd build/macos/Build/Products/Release
zip -r wger.app.zip wger.app
- uses: actions/upload-artifact@v4
with:
name: builds-macos
path: build/macos/Build/Products/Release/wger.app.zip