diff --git a/.github/workflows/cd_prod.yml b/.github/workflows/cd_prod.yml index 6fe38d7..b39a1ba 100644 --- a/.github/workflows/cd_prod.yml +++ b/.github/workflows/cd_prod.yml @@ -8,6 +8,10 @@ name: Build prod .aab & .apk on: workflow_dispatch: + +env: + BUILD_ARGS: --release --flavor prod --dart-define cameraPreviewAspectRatio=2/3 -t lib/main_prod.dart + jobs: build: runs-on: macos-11 @@ -70,7 +74,7 @@ jobs: flutter pub run intl_utils:generate - name: Build apk - run: flutter build apk --release --flavor prod --dart-define cameraPreviewAspectRatio=2/3 -t lib/main_prod.dart + run: flutter build apk $BUILD_ARGS - name: Upload apk to artifacts uses: actions/upload-artifact@v3 @@ -79,7 +83,7 @@ jobs: path: build/app/outputs/flutter-apk/app-prod-release.apk - name: Build appbundle - run: flutter build appbundle --release --flavor prod --dart-define cameraPreviewAspectRatio=2/3 -t lib/main_prod.dart + run: flutter build appbundle $BUILD_ARGS - name: Upload app bundle to artifacts uses: actions/upload-artifact@v3 @@ -89,9 +93,12 @@ jobs: - name: Zip merged_native_libs folder uses: vimtor/action-zip@v1.1 + env: + PATH_TO_LIBS: build/app/intermediates/merged_native_libs/prodRelease/out/lib with: - files: build/app/intermediates/merged_native_libs/prodRelease/out/lib/arm64-v8a/ build/app/intermediates/merged_native_libs/prodRelease/out/lib/armeabi-v7a/ + files: $PATH_TO_LIBS/arm64-v8a/ $PATH_TO_LIBS/armeabi-v7a/ dest: merged_native_libs.zip + recursive: false - name: Upload merged_native_libs to artifacts uses: actions/upload-artifact@v3