Skip to content

Bump actions/checkout from 5 to 6 (#671) #1620

Bump actions/checkout from 5 to 6 (#671)

Bump actions/checkout from 5 to 6 (#671) #1620

Workflow file for this run

name: Build app
on:
pull_request:
merge_group:
push:
branches: ["main"]
jobs:
android_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Java 21
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
- uses: kuhnroyal/flutter-fvm-config-action/setup@v3
- name: Get Dependencies
run: flutter pub get
- name: Validate pubspec.lock is up to date
run: |
if ! git diff --quiet pubspec.lock; then
echo "::error ::pubspec.lock is out of date. Run 'fvm flutter pub get' and commit the updated file."
exit 1
fi
- name: Decode google-services.json
run: echo $GOOGLE_SERVICES_JSON | base64 --decode > android/app/google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON_ANDROID_BASE64 }}
- name: Build Android on debug mode (capture logs)
run: flutter build appbundle --debug 2>&1 | tee build_log.txt
- name: Check for obsolete Java version warnings
run: |
if grep -q "source value 8 is obsolete" build_log.txt; then
echo "❌ Obsolete Java 'source' value warning found!"
exit 1
elif grep -q "target value 8 is obsolete" build_log.txt; then
echo "❌ Obsolete Java 'target' value warning found!"
exit 1
else
echo "✅ No obsolete Java version warnings found."
fi
ios_build:
runs-on: macos-15
steps:
- uses: actions/checkout@v6
- uses: kuhnroyal/flutter-fvm-config-action/setup@v3
- name: Decode GoogleService-Info.plist secrets
env:
GOOGLESERVICES_INFO_PLIST_JSON: ${{ secrets.GOOGLESERVICE_INFO_PLIST_IOS_BASE64 }}
run: |
echo $GOOGLESERVICES_INFO_PLIST_JSON | base64 --decode > ios/Runner/GoogleService-Info.plist
- run: flutter pub get
- name: Create .env file
run: |
echo "OLD_PASSWORD=CHANGE_ME_TO_A_STRONG_PASSWORD" > .env
- name: Generate env.g.dart
run: |
dart run build_runner clean
dart run build_runner build --delete-conflicting-outputs
- name: Validate pubspec.lock is up to date
run: |
if ! git diff --quiet pubspec.lock; then
echo "::error ::pubspec.lock is out of date. Run 'fvm flutter pub get' and commit the updated file."
exit 1
fi
- name: Build ios
run: flutter build ios --release --no-codesign