Skip to content

build ipadOS (iOS)

build ipadOS (iOS) #27

Workflow file for this run

name: build ipadOS (iOS)
on:
workflow_dispatch:
inputs:
comments:
description: "Comments"
required: false
default: "Nothing"
type: string
permissions:
contents: read
pages: write
id-token: write
jobs:
build_info:
runs-on: ubuntu-latest
steps:
- run: |
echo "Worker Comments: $BUILD_CMTS"
env:
BUILD_CMTS: ${{ inputs.comments }}
build_ios:
runs-on: macos-latest
steps:
- name: "setup flutter"
uses: subosito/flutter-action@v2
with:
flutter-version: "3.x"
channel: "stable"
- uses: actions/checkout@v3
- name: Set iOS deployment target
run: |
echo "IPHONEOS_DEPLOYMENT_TARGET=15.5" >> $GITHUB_ENV
- name: Create Podfile with deployment target
run: |
cat > ios/Podfile << 'EOL'
platform :ios, '15.5'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.5'
end
end
end
EOL
- run: flutter --version
- run: flutter pub get
- run: flutter build ios --release --no-codesign --no-tree-shake-icons
- run: flutter build ipa --release --no-codesign --no-tree-shake-icons
- name: Upload iOS build
uses: actions/upload-artifact@v4
with:
name: iOS_Build
path: ./build/ios