diff --git a/.github/workflows/e2e-flutter.yml b/.github/workflows/e2e-flutter.yml new file mode 100644 index 0000000..c2c33fd --- /dev/null +++ b/.github/workflows/e2e-flutter.yml @@ -0,0 +1,56 @@ +name: "[flutter] E2E Test Nativebrik SDK" +on: + workflow_dispatch: + push: + branches: [main] + +jobs: + publish-flutter-ios-e2e-app: + runs-on: macos-13 + environment: + name: Only Main + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: "15.0" + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + flutter-version: 3.3.0 + - name: Build iOS + working-directory: flutter/nativebrik_bridge/e2e + run: flutter build ios --no-codesign + - name: Zip app + run: | + cd build/ios/iphoneos && zip -r Runner.app.zip ./Runner.app + - name: Uploade to magicpod + run: | + curl -L -X POST -F "file=@build/ios/iphoneos/Runner.app.zip" -H "Authorization: Token ${{ secrets.MAGICPOD_API_TOKEN }}" "https://app.magicpod.com/api/v1.0/Nativebrik.inc/Nativebrik-Flutter/upload-file/" + + publish-android-e2e-app: + runs-on: ubuntu-latest + environment: + name: Only Main + steps: + - name: checkout + uses: actions/checkout@v2 + - name: setup jdk + uses: actions/setup-java@v2 + with: + distribution: "zulu" + java-version: "21" + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + flutter-version: 3.3.0 + - name: Build iOS + working-directory: flutter/nativebrik_bridge/e2e + run: flutter build apk + - name: upload e2e app + working-directory: flutter/nativebrik_bridge/e2e + run: | + curl -L -X POST -F "file=@build/app/outputs/flutter-apk/app-debug.apk" -H "Authorization: Token ${{ secrets.MAGICPOD_API_TOKEN }}" "https://app.magicpod.com/api/v1.0/Nativebrik.inc/Nativebrik-Flutter/upload-file/"