From c8074fd86e3f2305dff088b5b8271b8958479bba Mon Sep 17 00:00:00 2001 From: sanjay14073 <103362239+sanjay14073@users.noreply.github.com> Date: Fri, 18 Oct 2024 18:20:12 +0530 Subject: [PATCH] Added build apk action --- .github/workflows/build_apk.yml | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/build_apk.yml diff --git a/.github/workflows/build_apk.yml b/.github/workflows/build_apk.yml new file mode 100644 index 0000000..8abb940 --- /dev/null +++ b/.github/workflows/build_apk.yml @@ -0,0 +1,41 @@ +name: Build APK on Merge to Main + +on: + push: + branches: + - main + +jobs: + build-apk: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Java + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.19.5' + channel: stable + + - name: Install dependencies + run: flutter pub get + continue-on-error: true + + - name: Build APK + run: flutter build apk --release + continue-on-error: true + + - name: Upload APK as artifact + uses: actions/upload-artifact@v3 + with: + name: apk + path: build/app/outputs/flutter-apk/app-release.apk + continue-on-error: true