wip #345
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: Flutter build | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
jobs: | |
buildAndTestAndroid: | |
name: Build beta sideload | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
check-latest: false | |
- name: Load Flutter config | |
uses: kuhnroyal/flutter-fvm-config-action@v2 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.FLUTTER_VERSION }} | |
channel: ${{ env.FLUTTER_CHANNEL }} | |
cache: true | |
- name: Flutter version | |
run: flutter --version | |
- name: Cache pub dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.PUB_CACHE }} | |
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} | |
restore-keys: ${{ runner.os }}-pub- | |
- name: Download pub dependencies | |
run: flutter pub get | |
# - name: Run build_runner | |
# run: flutter pub run build_runner build --delete-conflicting-outputs | |
- name: Run analyzer | |
run: flutter analyze | |
- name: Run tests | |
run: flutter test | |
- name: Download Android keystore beta | |
id: android_keystore_beta | |
uses: timheuer/[email protected] | |
with: | |
fileDir: /home/runner/ | |
fileName: keystore-kv-beta.pfx | |
encodedString: ${{ secrets.ANDROID_KEYSTORE_BETA_BASE64 }} | |
- name: Build Android App Bundle | |
env: | |
KEEVAULT_ANDROID_BETA_KEYSTORE_PASSWORD: ${{ secrets.KEEVAULT_ANDROID_BETA_KEYSTORE_PASSWORD }} | |
run: flutter build appbundle --dart-define KEEVAULT_STAGE=beta --dart-define KEEVAULT_CHANNEL=sideload | |
BuildAndTestIos: | |
name: Build ios prod | |
runs-on: macos-14 | |
permissions: write-all | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Load Flutter config | |
uses: kuhnroyal/flutter-fvm-config-action@v2 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.FLUTTER_VERSION }} | |
channel: ${{ env.FLUTTER_CHANNEL }} | |
cache: true | |
- name: Flutter version | |
run: flutter --version | |
- name: Cache pub dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.PUB_CACHE }} | |
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} | |
restore-keys: ${{ runner.os }}-pub- | |
- name: Download pub dependencies | |
run: flutter pub get | |
- name: Run analyzer | |
run: flutter analyze | |
- name: Run tests | |
run: flutter test | |
- name: Choose xcode version | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.2' | |
- name: Build iOS Flutter App | |
run: flutter build ios --config-only --release --no-codesign --dart-define KEEVAULT_STAGE=prod --dart-define KEEVAULT_NAME_SUFFIX= --dart-define KEEVAULT_ID_SUFFIX= --dart-define IAP_APPLE_APP_STORE=yes | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
bundler: 2.5.6 | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Build iOS App bundle | |
env: | |
MATCH_GIT_BASIC_AUTHORIZATION: '${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}' | |
MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}' | |
TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}' | |
TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}' | |
run: | | |
cd ios | |
bundle exec fastlane prod_build_only |