name: Build APK on: push: branches: - main jobs: build: runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v4 - name: Set up JDK 17 uses: actions/setup-java@v4 with: distribution: temurin java-version: "17" - name: Set up Flutter uses: subosito/flutter-action@v2 with: channel: stable - name: Set up Android SDK uses: android-actions/setup-android@v3 with: # Google removed the legacy standalone "tools" package from the # SDK repository (~Sep 2026); the action's own default packages # list ("tools platform-tools") now makes its internal sdkmanager # call fail for everyone. platform-tools is all this step needs # to install itself - flutter build fetches whatever # platform/build-tools versions it actually needs on its own. packages: "platform-tools" - name: Install dependencies run: flutter pub get - name: Analyze run: flutter analyze - name: Build release APK run: flutter build apk --release - name: Upload APK uses: actions/upload-artifact@v4 with: name: app-release-apk path: build/app/outputs/flutter-apk/app-release.apk