103 lines
2.9 KiB
YAML
103 lines
2.9 KiB
YAML
name: Build iOS IPA
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
tags:
|
|
- 'v*'
|
|
- 'latest'
|
|
workflow_dispatch:
|
|
|
|
# Only the newest push per branch/tag is built.
|
|
concurrency:
|
|
group: build-ios-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
# Keep in sync with .gitea/workflows/build-apk.yaml and pubspec.yaml (environment).
|
|
FLUTTER_VERSION: '3.47.4'
|
|
|
|
jobs:
|
|
build-ios:
|
|
name: Build iOS IPA
|
|
# macOS 26 (arm64) ships Xcode 26 by default; Flutter 3.47 needs Xcode >= 16.
|
|
runs-on: macos-26
|
|
timeout-minutes: 60
|
|
if: github.server_url == 'https://github.com'
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
channel: stable
|
|
cache: true
|
|
|
|
- name: Configure Flutter
|
|
run: |
|
|
# All plugins of this project are integrated via CocoaPods. Turning
|
|
# off the (default-on) Swift Package Manager integration keeps the
|
|
# build on that single, deterministic path.
|
|
flutter config --no-enable-swift-package-manager
|
|
|
|
- name: Inspect Environment
|
|
run: |
|
|
xcodebuild -version
|
|
pod --version
|
|
flutter --version
|
|
flutter doctor -v
|
|
|
|
- name: Fetch Flutter Dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Build iOS (Unsigned)
|
|
run: flutter build ios --release --no-codesign
|
|
|
|
- name: Package IPA
|
|
run: |
|
|
set -euo pipefail
|
|
cd build/ios/iphoneos
|
|
rm -rf Payload oggauer-gemeindetrommler.ipa
|
|
mkdir Payload
|
|
cp -R Runner.app Payload/
|
|
zip -qry oggauer-gemeindetrommler.ipa Payload
|
|
ls -lh oggauer-gemeindetrommler.ipa
|
|
|
|
- name: Upload IPA Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: oggauer-gemeindetrommler-ios
|
|
path: build/ios/iphoneos/oggauer-gemeindetrommler.ipa
|
|
retention-days: 7
|
|
if-no-files-found: error
|
|
|
|
- name: Publish IPA to GitHub Release
|
|
if: github.event_name != 'pull_request'
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }}
|
|
name: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'Oggauer Gemeindetrommler - LATEST' }}
|
|
files: build/ios/iphoneos/oggauer-gemeindetrommler.ipa
|
|
make_latest: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload Xcode Logs (on failure)
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ios-build-logs
|
|
path: |
|
|
~/Library/Logs/DiagnosticReports/*.ips
|
|
build/ios/**/*.log
|
|
ios/Podfile.lock
|
|
if-no-files-found: ignore
|
|
retention-days: 3
|