From 0a1a3ff58bc91314423b2ed69af3bd8e17aa9a7d Mon Sep 17 00:00:00 2001 From: Htet Lynn Htun Date: Wed, 24 Jul 2024 21:26:20 +0700 Subject: [PATCH] Add build workflow --- .github/workflows/main.yaml | 33 +++++++++++++++++++++++++++++++++ pubspec.lock | 2 +- pubspec.yaml | 1 + 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..9fa9392 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,33 @@ +name: Build an unsigned apk + +on: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.7 + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + flutter-version-file: pubspec.yaml + - run: flutter --version + + - name: Get dependencies + run: flutter pub get + + - name: Build release apk + run: flutter build apk --split-per-abi + + - name: Upload artifacts + uses: actions/upload-artifact@v4.3.4 + with: + name: Android apks + path: build/app/outputs/flutter-apk/*release.apk diff --git a/pubspec.lock b/pubspec.lock index 040249c..38ce9dd 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1183,4 +1183,4 @@ packages: version: "2.2.1" sdks: dart: ">=3.4.3 <4.0.0" - flutter: ">=3.22.0" + flutter: ">=3.22.2" diff --git a/pubspec.yaml b/pubspec.yaml index a0bcd1f..702c320 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,6 +6,7 @@ version: 1.0.0+11 environment: sdk: '>=3.4.3 <4.0.0' + flutter: 3.22.2 dependencies: flutter: