Building desktop apps 🖥️ #1648
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: Desktop Builds | |
| run-name: Building desktop apps 🖥️ | |
| on: | |
| pull_request: | |
| branches: [dev, main, fix/*, add/*, release/*, hotfix/*, feature/*] | |
| workflow_dispatch: | |
| release: | |
| types: [created] | |
| jobs: | |
| build_desktop: | |
| name: Build Desktop (${{ matrix.platform }}) | |
| runs-on: ${{ matrix.runner }} | |
| continue-on-error: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: macos | |
| runner: macos-latest | |
| build_command: flutter build macos --no-pub --release | |
| artifact_path: build/macos/Build/Products/Release/*.app | |
| artifact_name: komodo-wallet-macos | |
| - platform: windows | |
| runner: windows-latest | |
| build_command: flutter build windows --no-pub --release | |
| artifact_path: build/windows/x64/runner/Release/* | |
| artifact_name: komodo-wallet-windows | |
| - platform: linux | |
| runner: ubuntu-latest | |
| build_command: flutter build linux --no-pub --release | |
| artifact_path: build/linux/x64/release/bundle/* | |
| artifact_name: komodo-wallet-linux | |
| steps: | |
| - name: Checkout code | |
| id: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Flutter and dependencies | |
| id: install_flutter | |
| uses: ./.github/actions/flutter-deps | |
| # macOS setup | |
| - name: Setup macOS environment | |
| id: setup_macos | |
| if: ${{ matrix.platform == 'macos' }} | |
| uses: ./.github/actions/releases/setup-macos | |
| with: | |
| p12-file-base64: ${{ secrets.MACOS_P12_BASE64 }} | |
| p12-password: ${{ secrets.MACOS_P12_PASSWORD }} | |
| bundle-id: "com.komodo.wallet" | |
| profile-type: "MAC_APP_DEVELOPMENT" | |
| issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} | |
| api-key-id: ${{ secrets.APPSTORE_KEY_ID }} | |
| api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }} | |
| # Linux setup | |
| - name: Setup Linux environment | |
| id: setup_linux | |
| if: ${{ matrix.platform == 'linux' }} | |
| uses: ./.github/actions/releases/setup-linux | |
| with: | |
| gpg-key: ${{ secrets.LINUX_GPG_KEY }} | |
| gpg-key-id: ${{ secrets.LINUX_GPG_KEY_ID }} | |
| # Windows setup | |
| - name: Setup Windows environment | |
| id: setup_windows | |
| if: ${{ matrix.platform == 'windows' }} | |
| uses: ./.github/actions/releases/setup-windows | |
| with: | |
| pfx-base64: ${{ secrets.WINDOWS_PFX_BASE64 }} | |
| pfx-password: ${{ secrets.WINDOWS_PFX_PASSWORD }} | |
| - name: Fetch packages, generate assets, and build for ${{ matrix.platform }} | |
| id: build | |
| env: | |
| GITHUB_API_PUBLIC_READONLY_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Disable code signing for macOS PR builds | |
| CODE_SIGNING_ALLOWED: ${{ matrix.platform == 'macos' && github.event_name == 'pull_request' && 'NO' || '' }} | |
| CODE_SIGNING_REQUIRED: ${{ matrix.platform == 'macos' && github.event_name == 'pull_request' && 'NO' || '' }} | |
| EXPANDED_CODE_SIGN_IDENTITY: ${{ matrix.platform == 'macos' && github.event_name == 'pull_request' && '-' || '' }} | |
| 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 | |
| id: upload_artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ${{ matrix.artifact_path }} | |
| name: ${{ matrix.artifact_name }}-${{ steps.vars.outputs.short_sha }}.zip | |
| retention-days: 5 |