From 0558120cfafa459cf763668b8d4746eb17aed49f Mon Sep 17 00:00:00 2001 From: Aidaiym Date: Wed, 10 Jul 2024 13:18:09 +0600 Subject: [PATCH 1/3] add app distribution workflow --- .github/workflows/app_distribution.yaml | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/app_distribution.yaml diff --git a/.github/workflows/app_distribution.yaml b/.github/workflows/app_distribution.yaml new file mode 100644 index 00000000..a14ba9b6 --- /dev/null +++ b/.github/workflows/app_distribution.yaml @@ -0,0 +1,34 @@ +name: Build & upload to Firebase App Distribution + +on: + push: + branches: [main] + pull_request: + branches: [main] + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + - uses: subosito/flutter-action@v1 + with: + channel: 'stable' + + - name: Build release + run: flutter build apk --debug + - run: ls build/app/outputs/flutter-apk + - name: Upload artifact to Firebase App Distribution + uses: wzieba/Firebase-Distribution-Github-Action@v1 + with: + appId: ${{secrets.APP_ID}} + serviceCredentialsFileContent: ${{secrets.CREDENTIAL_FILE_CONTENT}} + groups: my_quran_testers + file: build/app/outputs/flutter-apk/app-debug.apk \ No newline at end of file From ca83734e3ddfc212506d0648805971259847f5e7 Mon Sep 17 00:00:00 2001 From: Aidaiym Date: Wed, 10 Jul 2024 13:25:27 +0600 Subject: [PATCH 2/3] fix workflow --- .github/workflows/app_distribution.yaml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/app_distribution.yaml b/.github/workflows/app_distribution.yaml index a14ba9b6..6c6ef163 100644 --- a/.github/workflows/app_distribution.yaml +++ b/.github/workflows/app_distribution.yaml @@ -6,7 +6,6 @@ on: pull_request: branches: [main] - jobs: build: runs-on: ubuntu-latest @@ -22,13 +21,28 @@ jobs: with: channel: 'stable' - - name: Build release - run: flutter build apk --debug - - run: ls build/app/outputs/flutter-apk + - run: flutter doctor + + - run: dart pub global activate flutterfire_cli + + - name: "Melos Install" + run: dart pub global activate melos + + - name: "Melos bs" + run: melos bootstrap + + - name: "Build apk" + run: melos build-apk + + - name: "Build appbundle" + run: melos build-appbundle + + - run: ls app/build/app/outputs/flutter-apk + - name: Upload artifact to Firebase App Distribution uses: wzieba/Firebase-Distribution-Github-Action@v1 with: appId: ${{secrets.APP_ID}} serviceCredentialsFileContent: ${{secrets.CREDENTIAL_FILE_CONTENT}} groups: my_quran_testers - file: build/app/outputs/flutter-apk/app-debug.apk \ No newline at end of file + file: app/build/app/outputs/flutter-apk/app-debug.apk From 6a3b2f3c7804e3560a7099e795df5bef6f0f956c Mon Sep 17 00:00:00 2001 From: Aidaiym Date: Wed, 10 Jul 2024 13:32:39 +0600 Subject: [PATCH 3/3] fix workflow --- .github/workflows/app_distribution.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/app_distribution.yaml b/.github/workflows/app_distribution.yaml index 6c6ef163..f1565db1 100644 --- a/.github/workflows/app_distribution.yaml +++ b/.github/workflows/app_distribution.yaml @@ -45,4 +45,4 @@ jobs: appId: ${{secrets.APP_ID}} serviceCredentialsFileContent: ${{secrets.CREDENTIAL_FILE_CONTENT}} groups: my_quran_testers - file: app/build/app/outputs/flutter-apk/app-debug.apk + file: app/build/app/outputs/flutter-apk/app-release.apk