Build #1231
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 11 * * *" | |
| name: Build | |
| env: | |
| FLUTTER_VERSION: 3.32.8 | |
| XCODE_VERSION: 16.0 | |
| jobs: | |
| build_debug_mobile: | |
| name: Build debug version for mobiles | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: android | |
| runner: ubuntu-latest | |
| - os: ios | |
| runner: macos-14 | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Free up disk space | |
| if: matrix.os == 'android' | |
| run: | | |
| echo "Disk space before cleanup:" | |
| df -h | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf /opt/hostedtoolcache/CodeQL | |
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
| sudo docker image prune --all --force | |
| sudo apt-get clean | |
| echo "Disk space after cleanup:" | |
| df -h | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| channel: "stable" | |
| cache: true | |
| cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}" | |
| - name: Setup Fastlane | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.3" | |
| bundler-cache: true | |
| working-directory: ${{ matrix.os }} | |
| - uses: webfactory/ssh-agent@v0.9.0 | |
| with: | |
| ssh-private-key: ${{ secrets.SSH_KEY }} | |
| - name: Setup Java | |
| if: matrix.os == 'android' | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" # See 'Supported distributions' for available options | |
| java-version: "17" | |
| - name: Select Xcode version | |
| if: matrix.os == 'ios' | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: ${{ env.XCODE_VERSION }} | |
| - name: Setup iOS | |
| if: matrix.os == 'ios' | |
| run: ./scripts/prepare-ios.sh | |
| - name: Build debug APK | |
| if: matrix.os == 'android' | |
| run: | | |
| ./scripts/build-android-debug.sh | |
| cp build/app/outputs/apk/debug/app-debug.apk twake-on-matrix-debug.apk | |
| - name: Build debug IPA | |
| if: matrix.os == 'ios' | |
| env: | |
| APPLE_CERTIFICATES_SSH_KEY: ${{ secrets.APPLE_CERTIFICATES_SSH_KEY }} | |
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| run: | | |
| bundle exec fastlane dev | |
| cp Runner.ipa ../Runner.ipa | |
| working-directory: ${{ matrix.os }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: twake-on-matrix-dev-${{ matrix.os }} | |
| path: | | |
| twake-on-matrix-debug.apk | |
| Runner.ipa |