@@ -47,25 +47,38 @@ jobs:
47
47
48
48
fs.writeFileSync('${{github.workspace}}/androidScreenshots.zip', Buffer.from(downloadAndroidScreenshots.data));
49
49
50
- var iosScreenshots = artifacts.data.artifacts.filter((artifact) => {
51
- return artifact.name == "iOS Screenshots"
50
+ var iPadScreenshots = artifacts.data.artifacts.filter((artifact) => {
51
+ return artifact.name == "iPad Screenshots"
52
52
})[0];
53
- var downloadIosScreenshots = await github.rest.actions.downloadArtifact({
53
+ var downloadiPadScreenshots = await github.rest.actions.downloadArtifact({
54
54
owner: context.repo.owner,
55
55
repo: context.repo.repo,
56
- artifact_id: iosScreenshots .id,
56
+ artifact_id: iPadScreenshots .id,
57
57
archive_format: 'zip',
58
58
});
59
59
60
- fs.writeFileSync('${{github.workspace}}/iosScreenshots.zip', Buffer.from(downloadIosScreenshots.data));
60
+ fs.writeFileSync('${{github.workspace}}/iPadScreenshots.zip', Buffer.from(downloadiPadScreenshots.data));
61
+
62
+ var iPhoneScreenshots = artifacts.data.artifacts.filter((artifact) => {
63
+ return artifact.name == "iPhone Screenshots"
64
+ })[0];
65
+ var downloadiPhoneScreenshots = await github.rest.actions.downloadArtifact({
66
+ owner: context.repo.owner,
67
+ repo: context.repo.repo,
68
+ artifact_id: iPhoneScreenshots.id,
69
+ archive_format: 'zip',
70
+ });
71
+
72
+ fs.writeFileSync('${{github.workspace}}/iPhoneScreenshots.zip', Buffer.from(downloadiPhoneScreenshots.data));
61
73
62
74
- name : Unzip Artifacts
63
75
shell : bash
64
76
run : |
65
77
unzip pr.zip
66
78
mkdir screenshots
67
79
unzip androidScreenshots.zip -d screenshots/
68
- unzip iosScreenshots.zip -d screenshots/
80
+ unzip iPadScreenshots.zip -d screenshots/
81
+ unzip iPhoneScreenshots.zip -d screenshots/
69
82
70
83
- name : Fetch PR Number
71
84
id : fetch-pr-number
@@ -135,6 +148,8 @@ jobs:
135
148
var statusText = `Build successful. APKs to test: ${artifact_url}.`;
136
149
137
150
var androidScreenshots = `
151
+ <details>
152
+ <summary>Android Screenshots</summary>
138
153
<table>
139
154
<tr>
140
155
<td><img src="https://github.com/fossasia/badgemagic-app/blob/pr-screenshots/${issue_number}_Pixel_6-1_home_screen.png?raw=true" width="1080"/></td>
@@ -150,9 +165,12 @@ jobs:
150
165
</td>
151
166
</tr>
152
167
</table>
168
+ </details>
153
169
`;
154
170
155
171
var iPhoneScreenshots = `
172
+ <details>
173
+ <summary>iPhone Screenshots</summary>
156
174
<table>
157
175
<tr>
158
176
<td><img src="https://github.com/fossasia/badgemagic-app/blob/pr-screenshots/${issue_number}_iPhone_16_Pro_Max-1_home_screen.png?raw=true" width="1080"/></td>
@@ -168,9 +186,12 @@ jobs:
168
186
</td>
169
187
</tr>
170
188
</table>
189
+ </details>
171
190
`;
172
191
173
192
var iPadScreenshots = `
193
+ <details>
194
+ <summary>iPad Screenshots</summary>
174
195
<table>
175
196
<tr>
176
197
<td><img src="https://github.com/fossasia/badgemagic-app/blob/pr-screenshots/${issue_number}_iPad_Pro_13-inch_(M4)-1_home_screen.png?raw=true" width="1080"/></td>
@@ -186,19 +207,16 @@ jobs:
186
207
</td>
187
208
</tr>
188
209
</table>
210
+ </details>
189
211
`;
190
212
191
213
const body = `
192
214
## Build Status
193
215
${statusText}
194
216
195
- ## Screenshots (Android)
217
+ ## Screenshots
196
218
${androidScreenshots}
197
-
198
- ## Screenshots (iPhone)
199
219
${iPhoneScreenshots}
200
-
201
- ## Screenshots (iPad)
202
220
${iPadScreenshots}
203
221
`;
204
222
@@ -245,13 +263,7 @@ jobs:
245
263
## Build Status
246
264
_Build workflow failed. Please check the logs for more information._
247
265
248
- ## Screenshots (Android)
249
- _Not able to fetch screenshots._
250
-
251
- ## Screenshots (iPhone)
252
- _Not able to fetch screenshots._
253
-
254
- ## Screenshots (iPad)
266
+ ## Screenshots
255
267
_Not able to fetch screenshots._
256
268
`;
257
269
0 commit comments