From 850e20b55833038d2f3e5a638b8e5708831f68f6 Mon Sep 17 00:00:00 2001 From: Sagar Shende Date: Wed, 5 Jun 2024 16:48:22 +0530 Subject: [PATCH] new fixes --- .github/workflows/flutter-workflow.yml | 87 +++++++------------------- 1 file changed, 21 insertions(+), 66 deletions(-) diff --git a/.github/workflows/flutter-workflow.yml b/.github/workflows/flutter-workflow.yml index 7f051c3..8258d5a 100644 --- a/.github/workflows/flutter-workflow.yml +++ b/.github/workflows/flutter-workflow.yml @@ -1,12 +1,16 @@ -name: Flutter CI - on: + pull_request: + branches: + - main + - master push: branches: + - main - master - + - develop +name: "Build & Release" jobs: - build-android: + build: name: Build and Release APK runs-on: ubuntu-latest steps: @@ -21,68 +25,19 @@ jobs: uses: subosito/flutter-action@v1 with: channel: 'stable' - - - name: Get Flutter Dependencies - run: flutter pub get - - - name: Build APK - run: flutter build apk --release --split-per-abi - - - name: Upload APK - if: success() - uses: actions/upload-artifact@v2 - with: - name: android-apk - path: build/app/outputs/apk/release/*.apk - - build-ios: - name: Build and Release iOS - runs-on: macos-latest - steps: - - uses: actions/checkout@v1 - - - name: Setup Flutter - uses: subosito/flutter-action@v1 - with: - channel: 'stable' - - - name: Get Flutter Dependencies - run: flutter pub get - - - name: Build iOS - run: flutter build ios --release --no-codesign - - - name: Upload iOS Build - if: success() - uses: actions/upload-artifact@v2 - with: - name: ios-build - path: build/ios/iphoneos/app.ipa - # path: build/ios/iphoneos/Runner.app - - release: - name: Create Release - runs-on: ubuntu-latest - needs: [build-android, build-ios] - steps: - - uses: actions/checkout@v1 - - - name: Download Artifacts - uses: actions/download-artifact@v2 - with: - name: android-apk - path: ./artifacts/android - - - uses: actions/download-artifact@v2 - with: - name: ios-build - path: ./artifacts/ios - - - name: Create Release + + - run: flutter build apk --release --split-per-abi + - run: | + flutter build ios --no-codesign + cd build/ios/iphoneos + mkdir Payload + cd Payload + ln -s ../Runner.app + cd .. + zip -r app.ipa Payload + - name: Push to Releases uses: ncipollo/release-action@v1 with: - artifacts: | - ./artifacts/android/* - ./artifacts/ios/* + artifacts: "build/app/outputs/apk/release/*.apk,build/ios/iphoneos/app.ipa" tag: v1.0.${{ github.run_number }} - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.TOKEN }}