build-app #13
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: build-app | |
on: | |
workflow_dispatch: | |
jobs: | |
build-android: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Cache Flutter | |
uses: actions/cache@v2 | |
id: flutter-cache | |
with: | |
key: $GITHUB_SHA-flutter | |
path: ~/.flutter | |
- name: Cache Gradle | |
uses: actions/cache@v2 | |
id: gradle-cache | |
with: | |
key: $GITHUB_SHA-gradle | |
path: ~/.gradle | |
- name: Set up JDK 19 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "19" | |
distribution: 'temurin' | |
cache: "gradle" | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- run: flutter pub get | |
- run: flutter build apk | |
build-ios: | |
runs-on: macos-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Cache CocoaPods | |
uses: actions/cache@v2 | |
id: cocoa-pods-cache | |
with: | |
key: $GITHUB_SHA-cocoa-pods | |
path: ~/Library/Caches/CocoaPods | |
- name: Cache Xcode Derived Data | |
uses: actions/cache@v2 | |
id: xcode-derived-data-cache | |
with: | |
key: $GITHUB_SHA-xcode-derived-data | |
path: ~/Library/Developer/Xcode/DerivedData | |
- name: Cache Flutter | |
uses: actions/cache@v2 | |
id: flutter-cache | |
with: | |
key: $GITHUB_SHA-flutter | |
path: ~/.flutter | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- run: flutter pub get | |
- name: Update Cocoapods repo | |
run: pod repo update | |
- name: Install pods | |
run: cd ios && rm Podfile.lock && pod install --repo-update && cd .. | |
- run: flutter build ios --release --no-codesign |