Building mobile apps 📱 #1609
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
| name: Mobile Builds | |
| run-name: Building mobile apps 📱 | |
| on: | |
| pull_request: | |
| branches: [dev, main, release/*, hotfix/*, feature/*] | |
| workflow_dispatch: | |
| release: | |
| types: [created] | |
| jobs: | |
| build_mobile: | |
| name: Build Mobile (${{ matrix.platform }}) | |
| runs-on: ${{ matrix.runner }} | |
| continue-on-error: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: iOS | |
| runner: macos-latest | |
| build_command: flutter build ios --no-pub --release --no-codesign | |
| artifact_path: build/ios/iphoneos/Runner.app | |
| artifact_name: komodo-wallet-ios-unsigned.app | |
| - platform: Android | |
| runner: ubuntu-latest | |
| build_command: flutter build apk --no-pub --release | |
| artifact_path: build/app/outputs/flutter-apk/app-release.apk | |
| artifact_name: komodo-wallet-android-unsigned.apk | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Flutter and dependencies | |
| uses: ./.github/actions/flutter-deps | |
| - name: Setup iOS environment | |
| if: ${{ matrix.platform == 'iOS' }} | |
| uses: ./.github/actions/releases/setup-ios | |
| with: | |
| p12-file-base64: ${{ secrets.IOS_P12_BASE64 }} | |
| p12-password: ${{ secrets.IOS_P12_PASSWORD }} | |
| bundle-id: "com.komodo.wallet" | |
| profile-type: "IOS_APP_STORE" | |
| issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} | |
| api-key-id: ${{ secrets.APPSTORE_KEY_ID }} | |
| api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }} | |
| - name: Setup Android environment | |
| if: ${{ matrix.platform == 'Android' }} | |
| uses: ./.github/actions/releases/setup-android | |
| with: | |
| keystore-base64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | |
| key-alias: ${{ secrets.ANDROID_KEY_ALIAS }} | |
| store-password: ${{ secrets.ANDROID_STORE_PASSWORD }} | |
| key-password: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
| # Flutter build with `--no-pub` flag fails on Android due to a | |
| # known regression with the build system in 3.32.5. | |
| # https://github.com/flutter/flutter/issues/169336 | |
| # Run config-only before the full double-build to ensure success. | |
| - name: Temporary workaround for Android build issue | |
| if: ${{ matrix.platform == 'Android' }} | |
| run: | | |
| flutter build apk --config-only | |
| - name: Fetch packages, generate assets, and build for ${{ matrix.platform }} | |
| env: | |
| GITHUB_API_PUBLIC_READONLY_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| uses: ./.github/actions/generate-assets | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TRELLO_API_KEY: ${{ secrets.TRELLO_API_KEY }} | |
| TRELLO_TOKEN: ${{ secrets.TRELLO_TOKEN }} | |
| TRELLO_BOARD_ID: ${{ secrets.TRELLO_BOARD_ID }} | |
| TRELLO_LIST_ID: ${{ secrets.TRELLO_LIST_ID }} | |
| FEEDBACK_API_KEY: ${{ secrets.FEEDBACK_API_KEY }} | |
| FEEDBACK_PRODUCTION_URL: ${{ secrets.FEEDBACK_PRODUCTION_URL }} | |
| MATOMO_URL: ${{ secrets.MATOMO_URL }} | |
| MATOMO_SITE_ID: ${{ secrets.MATOMO_SITE_ID }} | |
| BUILD_COMMAND: ${{ matrix.build_command }} | |
| - name: Compute short commit SHA | |
| id: vars | |
| shell: bash | |
| run: echo "short_sha=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact_name }}-${{ steps.vars.outputs.short_sha }} | |
| path: ${{ matrix.artifact_path }} | |
| retention-days: 5 |