Open History to see the last commit
1name: Mobile Showcase Screenshots
2
3on:
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 theme:
25 description: Palette to capture (all multiplies the run by six)
26 required: true
27 default: t3-code
28 type: choice
29 options:
30 - t3-code
31 - t3-chat
32 - grove
33 - ocean
34 - ember
35 - iris
36 - all
37
38permissions:
39 contents: read
40
41env:
42 NODE_OPTIONS: --max-old-space-size=8192
43
44jobs:
45 ios:
46 name: iPhone 6.9, iPhone 6.5, and iPad 13
47 if: inputs.platform == 'all' || inputs.platform == 'ios'
48 runs-on: blacksmith-12vcpu-macos-26
49 # Capturing every palette multiplies the device matrix by six, and only the
50 # one native build is shared between them.
51 timeout-minutes: ${{ inputs.theme == 'all' && 300 || 60 }}
52 steps:
53 - name: Checkout
54 uses: actions/checkout@v6
55 with:
56 sparse-checkout: |
57 /*
58 !/.repos/
59 sparse-checkout-cone-mode: false
60
61 - name: Setup Vite+
62 uses: voidzero-dev/setup-vp@v1
63 with:
64 node-version-file: package.json
65 cache: true
66 run-install: |
67 args:
68 - --filter=@t3tools/mobile...
69 - --filter=@t3tools/scripts...
70 - --filter=t3...
71
72 - name: Expose pnpm
73 run: |
74 pnpm_version="$(node --print "require('./package.json').packageManager.split('@').pop()")"
75 vp_pnpm_bin="$HOME/.vite-plus/package_manager/pnpm/$pnpm_version/pnpm/bin"
76 echo "$vp_pnpm_bin" >> "$GITHUB_PATH"
77 "$vp_pnpm_bin/pnpm" --version
78
79 - name: Capture iOS showcase
80 run: pnpm screenshots:mobile --platform ios --appearance "${{ inputs.appearance }}" --theme "${{ inputs.theme }}"
81
82 - name: Validate App Store Connect assets
83 run: pnpm screenshots:mobile --platform ios --appearance "${{ inputs.appearance }}" --theme "${{ inputs.theme }}" --validate-only
84
85 - name: Upload iOS screenshots
86 if: always()
87 uses: actions/upload-artifact@v7
88 with:
89 name: app-store-connect-screenshots
90 path: artifacts/app-store/screenshots/apple/
91 if-no-files-found: warn
92 retention-days: 14
93
94 android:
95 name: Android phone, 7-inch tablet, and 10-inch tablet
96 if: inputs.platform == 'all' || inputs.platform == 'android'
97 runs-on: blacksmith-16vcpu-ubuntu-2404
98 # Capturing every palette multiplies the device matrix by six, and only the
99 # one native build is shared between them.
100 timeout-minutes: ${{ inputs.theme == 'all' && 300 || 60 }}
101 env:
102 T3_SHOWCASE_ANDROID_ABI: x86_64
103 steps:
104 - name: Checkout
105 uses: actions/checkout@v6
106 with:
107 sparse-checkout: |
108 /*
109 !/.repos/
110 sparse-checkout-cone-mode: false
111
112 - name: Setup Vite+
113 uses: voidzero-dev/setup-vp@v1
114 with:
115 node-version-file: package.json
116 cache: true
117 run-install: |
118 args:
119 - --filter=@t3tools/mobile...
120 - --filter=@t3tools/scripts...
121 - --filter=t3...
122
123 - name: Expose pnpm
124 run: |
125 pnpm_version="$(node --print "require('./package.json').packageManager.split('@').pop()")"
126 vp_pnpm_bin="$HOME/.vite-plus/package_manager/pnpm/$pnpm_version/pnpm/bin"
127 echo "$vp_pnpm_bin" >> "$GITHUB_PATH"
128 "$vp_pnpm_bin/pnpm" --version
129
130 - name: Setup Java
131 uses: actions/setup-java@v5
132 with:
133 distribution: temurin
134 java-version: 17
135
136 - name: Setup Gradle cache
137 uses: gradle/actions/setup-gradle@v5
138
139 - name: Enable KVM
140 run: |
141 echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS="static_node=kvm"' \
142 | sudo tee /etc/udev/rules.d/99-kvm4all.rules
143 sudo udevadm control --reload-rules
144 sudo udevadm trigger --name-match=kvm
145
146 - name: Capture Android showcase
147 uses: reactivecircus/android-emulator-runner@v2
148 with:
149 api-level: 36
150 target: google_apis
151 arch: x86_64
152 profile: pixel_7_pro
153 avd-name: Pixel_10_Pro
154 cores: 8
155 ram-size: 4096M
156 disable-animations: false
157 script: pnpm screenshots:mobile --platform android --appearance "${{ inputs.appearance }}" --theme "${{ inputs.theme }}"
158
159 - name: Validate Google Play assets
160 run: pnpm screenshots:mobile --platform android --appearance "${{ inputs.appearance }}" --theme "${{ inputs.theme }}" --validate-only
161
162 - name: Upload Android screenshots
163 if: always()
164 uses: actions/upload-artifact@v7
165 with:
166 name: google-play-screenshots
167 path: artifacts/app-store/screenshots/google-play/
168 if-no-files-found: warn
169 retention-days: 14