workflow: upgraded all actions to their latest versions #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create an iOS Simulator build | |
on: | |
push: | |
paths: | |
- '*' | |
- '.github/workflows/build-ios-simulator.yml' | |
- 'assets/**' | |
- 'lib/**' | |
- 'ios/**' | |
- '!**/*.md' | |
branches: | |
- main | |
jobs: | |
build-ios-simulator: | |
name: Create an iOS Simulator build | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Setup the flutter environment. | |
- name: Setup Flutter environment | |
uses: subosito/flutter-action@v2 | |
with: | |
cache: true | |
- name: Restore Pods cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
ios/Pods | |
~/Library/Caches/CocoaPods | |
~/.cocoapods | |
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} | |
restore-keys: ${{ runner.os }}-pods- | |
- name: Build iOS ipa | |
run: flutter build ios --simulator --no-codesign --obfuscate --split-debug-info --config-only | |
- name: Store build .app file as zip | |
run: | | |
cd build/ios/iphonesimulator | |
mv Runner.app flutter_samples.app | |
mkdir -p output | |
zip -r -y -o output/flutter_samples.zip flutter_samples.app | |
- name: Save build file as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: flutter_samples | |
path: build/ios/iphonesimulator/output |