diff --git a/.github/workflows/deploy_beta.yml b/.github/workflows/deploy_beta.yml index f05bf23e..7151f2c9 100644 --- a/.github/workflows/deploy_beta.yml +++ b/.github/workflows/deploy_beta.yml @@ -10,26 +10,57 @@ permissions: jobs: deploy: - runs-on: macos-26 + runs-on: ${{ matrix.os }} strategy: matrix: - platform: [ ios, android ] + include: + - platform: ios + os: macos-26 + - platform: android + os: ubuntu-latest fail-fast: false steps: - uses: actions/checkout@v4 + - name: Setup Ruby and install gems + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + working-directory: ${{ matrix.platform }} + bundler-cache: true + - if: matrix.platform == 'android' uses: actions/setup-java@v3 with: distribution: 'corretto' java-version: '21' + cache: 'gradle' - name: Setup Flutter uses: subosito/flutter-action@v2 with: channel: stable + cache: true + + - if: matrix.platform == 'ios' + name: Cache CocoaPods + uses: actions/cache@v4 + with: + path: | + ios/Pods + ~/.cocoapods + key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} + restore-keys: ${{ runner.os }}-pods- + + - if: matrix.platform == 'ios' + name: Cache Xcode DerivedData (SPM + compiled pods) + uses: actions/cache@v4 + with: + path: ios/DerivedData + key: ${{ runner.os }}-deriveddata-${{ hashFiles('ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'ios/Podfile.lock') }} + restore-keys: ${{ runner.os }}-deriveddata- - name: Install Flutter Packages run: | @@ -54,7 +85,7 @@ jobs: name: Build and Deploy With Release Notes to TestFlight run: | cd ./ios - fastlane ios_beta + bundle exec fastlane ios_beta env: APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.ASC_KEY_ID }} APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} @@ -68,7 +99,7 @@ jobs: name: Build and Deploy to TestFlight run: | cd ./ios - fastlane ios_beta + bundle exec fastlane ios_beta env: APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.ASC_KEY_ID }} APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} @@ -87,7 +118,7 @@ jobs: name: Deploy to Google Play Store run: | cd ./android - fastlane android_beta + bundle exec fastlane android_beta env: GOOGLE_PLAY_SERVICE_ACCOUNT_KEY: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }} ANDROID_KEYSTORE_FILE: ./upload-keystore @@ -99,7 +130,7 @@ jobs: name: Build Release APK run: | cd ./android - fastlane android_apk + bundle exec fastlane android_apk env: GOOGLE_PLAY_SERVICE_ACCOUNT_KEY: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }} ANDROID_KEYSTORE_FILE: ./upload-keystore diff --git a/.github/workflows/lint_test_build.yml b/.github/workflows/lint_test_build.yml index e58a8d4c..a14d52b6 100644 --- a/.github/workflows/lint_test_build.yml +++ b/.github/workflows/lint_test_build.yml @@ -4,8 +4,8 @@ on: pull_request: jobs: - build: - runs-on: macos-26 + analyze_and_test: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -14,6 +14,7 @@ jobs: uses: subosito/flutter-action@v2 with: channel: stable + cache: true - name: Install Flutter Packages run: flutter pub get @@ -24,20 +25,56 @@ jobs: - name: Run Tests run: flutter test - - name: Install CocoaPods - run: cd ./ios && pod install + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + include: + - platform: ios + os: macos-26 + - platform: android + os: ubuntu-latest + fail-fast: false + + steps: + - uses: actions/checkout@v4 - - name: Install Java SDK + - if: matrix.platform == 'android' + name: Install Java SDK uses: actions/setup-java@v3 with: distribution: 'corretto' java-version: '21' + cache: 'gradle' + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + cache: true + + - name: Install Flutter Packages + run: flutter pub get - - name: Build iOS + - if: matrix.platform == 'ios' + name: Cache CocoaPods + uses: actions/cache@v4 + with: + path: | + ios/Pods + ~/.cocoapods + key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} + restore-keys: ${{ runner.os }}-pods- + + - if: matrix.platform == 'ios' + name: Install CocoaPods + run: cd ./ios && pod install + + - if: matrix.platform == 'ios' + name: Build iOS run: flutter build ipa --no-codesign - - name: Build Android + - if: matrix.platform == 'android' + name: Build Android run: flutter build apk - - #- name: Build Website - # run: flutter build web --base-href / diff --git a/android/Gemfile b/android/Gemfile index 7a118b49..3f18de4a 100644 --- a/android/Gemfile +++ b/android/Gemfile @@ -1,3 +1,3 @@ source "https://rubygems.org" -gem "fastlane" +gem "fastlane", ">= 2.236.1" diff --git a/ios/Gemfile b/ios/Gemfile index adc90d98..b12843e1 100644 --- a/ios/Gemfile +++ b/ios/Gemfile @@ -1,3 +1,3 @@ source "https://rubygems.org" -gem "fastlane" \ No newline at end of file +gem "fastlane", ">= 2.236.1" \ No newline at end of file diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 1d756b49..bcd5df95 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -52,7 +52,8 @@ platform :ios do scheme: "Runner", workspace: "Runner.xcworkspace", export_method: "app-store", - skip_package_dependencies_resolution: true + skip_package_dependencies_resolution: true, + derived_data_path: "DerivedData" ) upload_to_testflight(