Skip to content

Merge branch 'master' of https://github.com/GDG-UEM-Kolkata/BuildWith… #5

Merge branch 'master' of https://github.com/GDG-UEM-Kolkata/BuildWith…

Merge branch 'master' of https://github.com/GDG-UEM-Kolkata/BuildWith… #5

Workflow file for this run

name: Build APKs for Multiple Apps
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Set up Flutter
uses: flutter-actions/setup-flutter@v2
with:
flutter-version: '3.10.5' # Use a specific stable version here
- name: Cache Pub dependencies
uses: actions/cache@v3
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
# Step 1: Build APK for visionapp
- name: Install dependencies for visionapp
run: flutter pub get
working-directory: visionapp/crop
- name: Build APK for visionapp
run: flutter build apk --release
working-directory: visionapp/crop
- name: Rename visionapp APK
run: mv visionapp/crop/build/app/outputs/flutter-apk/app-release.apk visionapp/crop/build/app/outputs/flutter-apk/visionapp.apk
- name: Upload visionapp APK artifact
uses: actions/upload-artifact@v3
with:
name: visionapp.apk
path: visionapp/crop/build/app/outputs/flutter-apk/visionapp.apk
# Step 2: Build APK for ml_kit_flutter
- name: Install dependencies for ml_kit_flutter
run: flutter pub get
working-directory: ml_kit_flutter/packages/example
- name: Build APK for ml_kit_flutter
run: flutter build apk --release
working-directory: ml_kit_flutter/packages/example
- name: Rename ml_kit_flutter APK
run: mv ml_kit_flutter/packages/example/build/app/outputs/flutter-apk/app-release.apk ml_kit_flutter/packages/example/build/app/outputs/flutter-apk/ml_kit_flutter.apk
- name: Upload ml_kit_flutter APK artifact
uses: actions/upload-artifact@v3
with:
name: ml_kit_flutter.apk
path: ml_kit_flutter/packages/example/build/app/outputs/flutter-apk/ml_kit_flutter.apk