feat(mobile): iOS app testflight #1
Workflow file for this run
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: Release Mobile App | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| build-target: | |
| description: 'Build Target' | |
| type: choice | |
| required: true | |
| default: distribution | |
| options: | |
| - development | |
| - distribution | |
| build-type: | |
| description: 'Build Type' | |
| type: choice | |
| required: true | |
| default: canary | |
| options: | |
| - canary | |
| - beta | |
| - stable | |
| env: | |
| BUILD_TYPE: ${{ github.event.inputs.build-type }} | |
| DEBUG: napi:* | |
| jobs: | |
| build-mobile-web: | |
| runs-on: ubuntu-latest | |
| environment: ${{ github.event.inputs.build-type }} | |
| outputs: | |
| RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Version | |
| id: version | |
| uses: ./.github/actions/setup-version | |
| - name: Setup Node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Setup @sentry/cli | |
| uses: ./.github/actions/setup-sentry | |
| - name: Build Mobile | |
| run: yarn nx build @affine/mobile --skip-nx-cache | |
| env: | |
| PUBLIC_PATH: '/' | |
| MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN }} | |
| SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
| SENTRY_PROJECT: 'affine' | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
| SENTRY_RELEASE: ${{ steps.version.outputs.APP_VERSION }} | |
| RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }} | |
| SKIP_NX_CACHE: 'true' | |
| - name: Upload mobile artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mobile | |
| path: packages/frontend/apps/mobile/dist | |
| ios: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download mobile artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: mobile | |
| path: packages/frontend/apps/mobile/dist | |
| - name: Testflight | |
| if: ${{ github.event.inputs.build-type }} != 'stable' && ${{ github.event.inputs.build-target }} == 'distribution' && ${{ github.event_name != 'pull_request' }} | |
| run: | | |
| echo "${{ secrets.APPLE_STORE_CONNECT_API_KEY }}" > ./packages/frontend/apps/mobile/ios/App/AuthKey_678LB7LX3H.p8 | |
| fastlane beta | |
| env: | |
| APPLE_STORE_CONNECT_API_KEY_ID: ${{ secrets.APPLE_STORE_CONNECT_API_KEY_ID }} | |
| APPLE_STORE_CONNECT_API_ISSUER_ID: ${{ secrets.APPLE_STORE_CONNECT_API_ISSUER_ID }} | |
| - name: Testflight | |
| if: ${{ github.event.inputs.build-type }} != 'stable' && (${{ github.event.inputs.build-target }} == 'development' || ${{ github.event_name == 'pull_request' }}) | |
| run: | | |
| echo "${{ secrets.APPLE_STORE_CONNECT_API_KEY }}" > ./packages/frontend/apps/mobile/ios/App/AuthKey_678LB7LX3H.p8 | |
| fastlane beta | |
| env: | |
| DRY_RUN: '1' | |
| APPLE_STORE_CONNECT_API_KEY_ID: ${{ secrets.APPLE_STORE_CONNECT_API_KEY_ID }} | |
| APPLE_STORE_CONNECT_API_ISSUER_ID: ${{ secrets.APPLE_STORE_CONNECT_API_ISSUER_ID }} |