frosty/.github/workflows/ci.yml

47 lines
1.6 KiB
YAML

name: CI
on:
push:
branches: [main]
jobs:
# Linux runner: analyze + test once (both are OS-independent) and compile a
# release APK to catch release-only breakage. Debug-signed via the build.gradle
# fallback (ALLOW_DEBUG_SIGNED_RELEASE) — no signing secrets needed.
android:
name: Analyze, test, and build Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# Match the JDK the release workflows build with, so this compile check
# faithfully catches what would break a real release.
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
- uses: subosito/flutter-action@v2
with:
flutter-version: 3.44.1
cache: true
- run: flutter doctor -v
- run: flutter pub get
- run: flutter analyze
- run: flutter test
- run: flutter build apk --release
env:
ALLOW_DEBUG_SIGNED_RELEASE: '1'
# macOS runner: release-compile iOS (no codesign, no secrets) — the only thing
# that must run on macOS. analyze/test already covered on the Linux job.
ios:
name: Build iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
# Match release workflows and avoid GitHub's lagging default Xcode.
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: subosito/flutter-action@v2
with:
flutter-version: 3.44.1
cache: true
- run: flutter pub get
- run: flutter build ios --release --no-codesign