|
| 1 | +name: Mobile Showcase Screenshots |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + platform: |
| 7 | + description: Device platforms to capture |
| 8 | + required: true |
| 9 | + default: all |
| 10 | + type: choice |
| 11 | + options: |
| 12 | + - all |
| 13 | + - ios |
| 14 | + - android |
| 15 | + appearance: |
| 16 | + description: System appearances to capture |
| 17 | + required: true |
| 18 | + default: both |
| 19 | + type: choice |
| 20 | + options: |
| 21 | + - both |
| 22 | + - dark |
| 23 | + - light |
| 24 | + |
| 25 | +permissions: |
| 26 | + contents: read |
| 27 | + |
| 28 | +env: |
| 29 | + NODE_OPTIONS: --max-old-space-size=8192 |
| 30 | + |
| 31 | +jobs: |
| 32 | + ios: |
| 33 | + name: iPhone 6.9, iPhone 6.5, and iPad 13 |
| 34 | + if: inputs.platform == 'all' || inputs.platform == 'ios' |
| 35 | + runs-on: blacksmith-12vcpu-macos-26 |
| 36 | + timeout-minutes: 60 |
| 37 | + steps: |
| 38 | + - name: Checkout |
| 39 | + uses: actions/checkout@v6 |
| 40 | + |
| 41 | + - name: Setup Vite+ |
| 42 | + uses: voidzero-dev/setup-vp@v1 |
| 43 | + with: |
| 44 | + node-version-file: package.json |
| 45 | + cache: true |
| 46 | + run-install: true |
| 47 | + |
| 48 | + - name: Expose pnpm |
| 49 | + run: | |
| 50 | + pnpm_version="$(node --print "require('./package.json').packageManager.split('@').pop()")" |
| 51 | + vp_pnpm_bin="$HOME/.vite-plus/package_manager/pnpm/$pnpm_version/pnpm/bin" |
| 52 | + echo "$vp_pnpm_bin" >> "$GITHUB_PATH" |
| 53 | + "$vp_pnpm_bin/pnpm" --version |
| 54 | +
|
| 55 | + - name: Capture iOS showcase |
| 56 | + run: pnpm screenshots:mobile --platform ios --appearance "${{ inputs.appearance }}" |
| 57 | + |
| 58 | + - name: Validate App Store Connect assets |
| 59 | + run: pnpm screenshots:mobile --platform ios --appearance "${{ inputs.appearance }}" --validate-only |
| 60 | + |
| 61 | + - name: Upload iOS screenshots |
| 62 | + if: always() |
| 63 | + uses: actions/upload-artifact@v7 |
| 64 | + with: |
| 65 | + name: app-store-connect-screenshots |
| 66 | + path: artifacts/app-store/screenshots/apple/ |
| 67 | + if-no-files-found: warn |
| 68 | + retention-days: 14 |
| 69 | + |
| 70 | + android: |
| 71 | + name: Android phone, 7-inch tablet, and 10-inch tablet |
| 72 | + if: inputs.platform == 'all' || inputs.platform == 'android' |
| 73 | + runs-on: blacksmith-16vcpu-ubuntu-2404 |
| 74 | + timeout-minutes: 60 |
| 75 | + env: |
| 76 | + T3_SHOWCASE_ANDROID_ABI: x86_64 |
| 77 | + steps: |
| 78 | + - name: Checkout |
| 79 | + uses: actions/checkout@v6 |
| 80 | + |
| 81 | + - name: Setup Vite+ |
| 82 | + uses: voidzero-dev/setup-vp@v1 |
| 83 | + with: |
| 84 | + node-version-file: package.json |
| 85 | + cache: true |
| 86 | + run-install: true |
| 87 | + |
| 88 | + - name: Expose pnpm |
| 89 | + run: | |
| 90 | + pnpm_version="$(node --print "require('./package.json').packageManager.split('@').pop()")" |
| 91 | + vp_pnpm_bin="$HOME/.vite-plus/package_manager/pnpm/$pnpm_version/pnpm/bin" |
| 92 | + echo "$vp_pnpm_bin" >> "$GITHUB_PATH" |
| 93 | + "$vp_pnpm_bin/pnpm" --version |
| 94 | +
|
| 95 | + - name: Setup Java |
| 96 | + uses: actions/setup-java@v5 |
| 97 | + with: |
| 98 | + distribution: temurin |
| 99 | + java-version: 17 |
| 100 | + |
| 101 | + - name: Setup Gradle cache |
| 102 | + uses: gradle/actions/setup-gradle@v5 |
| 103 | + |
| 104 | + - name: Enable KVM |
| 105 | + run: | |
| 106 | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS="static_node=kvm"' \ |
| 107 | + | sudo tee /etc/udev/rules.d/99-kvm4all.rules |
| 108 | + sudo udevadm control --reload-rules |
| 109 | + sudo udevadm trigger --name-match=kvm |
| 110 | +
|
| 111 | + - name: Capture Android showcase |
| 112 | + uses: reactivecircus/android-emulator-runner@v2 |
| 113 | + with: |
| 114 | + api-level: 36 |
| 115 | + target: google_apis |
| 116 | + arch: x86_64 |
| 117 | + profile: pixel_7_pro |
| 118 | + avd-name: Pixel_10_Pro |
| 119 | + cores: 8 |
| 120 | + ram-size: 4096M |
| 121 | + disable-animations: false |
| 122 | + script: pnpm screenshots:mobile --platform android --appearance "${{ inputs.appearance }}" |
| 123 | + |
| 124 | + - name: Validate Google Play assets |
| 125 | + run: pnpm screenshots:mobile --platform android --appearance "${{ inputs.appearance }}" --validate-only |
| 126 | + |
| 127 | + - name: Upload Android screenshots |
| 128 | + if: always() |
| 129 | + uses: actions/upload-artifact@v7 |
| 130 | + with: |
| 131 | + name: google-play-screenshots |
| 132 | + path: artifacts/app-store/screenshots/google-play/ |
| 133 | + if-no-files-found: warn |
| 134 | + retention-days: 14 |
0 commit comments