-
Notifications
You must be signed in to change notification settings - Fork 368
519 lines (429 loc) · 18.1 KB
/
ipa.yml
File metadata and controls
519 lines (429 loc) · 18.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
name: Build IPA with tweaks
on:
workflow_dispatch:
inputs:
ipa_url:
description: "URL to the decrypted IPA file"
default: ""
required: true
type: string
display_name:
description: "App Name (Optional)"
default: "YouTube"
required: true
type: string
bundle_id:
description: "Bundle ID (Optional)"
default: "com.google.ios.youtube"
required: true
type: string
youpip:
description: "Integrate YouPiP"
default: true
required: false
type: boolean
ytuhd:
description: "Integrate YTUHD"
default: true
required: false
type: boolean
ryd:
description: "Integrate Return-YouTube-Dislikes"
default: true
required: false
type: boolean
abconfig:
description: "Integrate YTABConfig"
default: true
required: false
type: boolean
youquality:
description: "Integrate YouQuality"
default: true
required: false
type: boolean
youspeed:
description: "Integrate YouSpeed"
default: true
required: false
type: boolean
demc:
description: "Integrate DontEatMyContent"
default: true
required: false
type: boolean
youmute:
description: "Integrate YouMute"
default: true
required: false
type: boolean
youloop:
description: "Integrate YouLoop"
default: true
required: false
type: boolean
ytweaks:
description: "Integrate YTweaks"
default: true
required: false
type: boolean
youslider:
description: "Integrate YouSlider"
default: true
required: false
type: boolean
ytholdspeed:
description: "Integrate YTHoldForSpeed"
default: true
required: false
type: boolean
youchoose:
description: "Integrate YouChooseQuality"
default: true
required: false
type: boolean
youshare:
description: "Integrate YouShare"
default: true
required: false
type: boolean
gonerino:
description: "Integrate Gonerino"
default: true
required: false
type: boolean
getcap:
description: "Integrate YouGetCaption"
default: true
required: false
type: boolean
ytshare:
description: "Integrate youtube-native-share"
default: true
required: false
type: boolean
volboost:
description: "Integrate VolumeBoostYT (Require iOS 16+)"
default: true
required: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build IPA with tweaks
runs-on: macos-latest
permissions:
contents: write
steps:
- name: Hide Sensitive Inputs
uses: levibostian/action-hide-sensitive-inputs@v1
with:
exclude_inputs: bundle_id,display_name,youpip,ytuhd,ryd,abconfig,youquality,youspeed,youmute,youloop,ytweaks,youslider,ytholdspeed,youchoose,youshare,gonerino,getcap,demc,ytshare,volboost
- name: Download and Validate IPA
run: |
wget "${{ inputs.ipa_url }}" --quiet --no-verbose -O youtube.ipa
file_type=$(file --mime-type -b youtube.ipa)
if [[ "$file_type" != "application/x-ios-app" && "$file_type" != "application/zip" ]]; then
echo "::error::Validation failed: The downloaded file is not a valid IPA. Detected type: $file_type."
exit 1
fi
- name: Get YouTube Version
run: |
unzip -q youtube.ipa -d ytextracted
echo "YT_VERSION=$(grep -A 1 '<key>CFBundleVersion</key>' ytextracted/Payload/YouTube.app/Info.plist | grep '<string>' | awk -F'[><]' '{print $3}')" >> $GITHUB_ENV
- name: Install Dependencies
run: brew install make ldid swiftlint
- name: Set PATH Environment Variables
run: |
echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
echo "THEOS=${{ github.workspace }}/theos" >> $GITHUB_ENV
# Original from YTweaks
- name: Get tweaks commit
run: |
get_commit_hash() {
local repo_url=$1
git ls-remote "$repo_url" HEAD | awk '{print substr($1,1,7)}'
}
echo "THEOS_COMMIT=$(get_commit_hash "https://github.com/theos/theos")" >> $GITHUB_ENV
echo "OPENYT_COMMIT=$(get_commit_hash "https://github.com/BillyCurtis/OpenYouTubeSafariExtension")" >> $GITHUB_ENV
echo "ALDERIS_COMMIT=$(get_commit_hash "https://github.com/hbang/Alderis")" >> $GITHUB_ENV
- name: Cache Theos
id: cache-theos
uses: actions/cache@v5
with:
path: theos
key: 18.6-SDK-${{ env.THEOS_COMMIT }}
- name: Setup Theos
if: ${{ steps.cache-theos.outputs.cache-hit != 'true' }}
run: |
git clone --quiet --depth=1 --recurse-submodules https://github.com/theos/theos.git
git clone --quiet --depth=1 -n --filter=tree:0 https://github.com/Tonwalter888/iOS-SDKs.git
cd iOS-SDKs
git sparse-checkout set --no-cone iPhoneOS18.6.sdk
git checkout --quiet
mv *.sdk "$THEOS/sdks"
- name: Clone headers
run: |
if [ ! -d "$THEOS/include/YouTubeHeader" ]; then
git clone --quiet --depth=1 https://github.com/PoomSmart/YouTubeHeader.git "$THEOS/include/YouTubeHeader"
else
cd $THEOS/include/YouTubeHeader
git pull --quiet --force
cd ${{ github.workspace }}
fi
if [ "${{ inputs.demc }}" = "true" ]; then
rm -fr "$THEOS/include/YTHeaders"
cp -r "$THEOS/include/YouTubeHeader" "$THEOS/include/YTHeaders"
fi
if [ ! -d "$THEOS/include/PSHeader" ]; then
git clone --quiet --depth=1 https://github.com/PoomSmart/PSHeader.git "$THEOS/include/PSHeader"
else
cd $THEOS/include/PSHeader
git pull --quiet --force
cd ${{ github.workspace }}
fi
- name: Fix Theos od broken pipe issue
run: sed -i '' 's/od -c "$i" | head/od -c "$i" 2>\/dev\/null | head/g' $THEOS/bin/convert_xml_plist.sh || true
- name: Install cyan and tbd
run: |
pipx install https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip
wget --quiet --no-verbose "https://github.com/inoahdev/tbd/releases/download/2.2/tbd-mac" -O /usr/local/bin/tbd
chmod +x /usr/local/bin/tbd
- name: Checkout YouMod
uses: actions/checkout@v6
with:
path: YouMod
- name: Clone Open in YouTube (Safari Extension)
run: |
git clone --quiet -n --depth=1 --filter=tree:0 https://github.com/BillyCurtis/OpenYouTubeSafariExtension.git
cd OpenYouTubeSafariExtension
git sparse-checkout set --no-cone OpenYouTubeSafariExtension.appex
git checkout --quiet
mv *.appex ${{ github.workspace }}
- name: Clone YouPiP
if: ${{ inputs.youpip }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouPiP.git
- name: Clone YTUHD
if: ${{ inputs.ytuhd }}
run: git clone --quiet --depth=1 https://github.com/Tonwalter888/YTUHD.git
- name: Clone Return-YouTube-Dislikes
if: ${{ inputs.ryd }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/Return-YouTube-Dislikes.git
- name: Clone YouGroupSettings
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouGroupSettings.git
- name: Clone YTVideoOverlay
if: ${{ inputs.youpip || inputs.ytuhd || inputs.youquality || inputs.youspeed || inputs.youmute || inputs.youloop || inputs.youshare || inputs.getcap }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YTVideoOverlay.git
- name: Clone YTABConfig
if: ${{ inputs.abconfig }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YTABConfig.git
- name: Clone YouQuality
if: ${{ inputs.youquality }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouQuality.git
- name: Clone YouSpeed
if: ${{ inputs.youspeed }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouSpeed.git
- name: Clone DontEatMyContent
if: ${{ inputs.demc }}
run: git clone --quiet --depth=1 https://github.com/therealFoxster/DontEatMyContent.git
- name: Clone YouMute
if: ${{ inputs.youmute }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouMute.git
- name: Clone YouLoop
if: ${{ inputs.youloop }}
run: git clone --quiet --depth=1 https://github.com/bhackel/YouLoop.git
- name: Clone YouSlider
if: ${{ inputs.youslider }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouSlider.git
- name: Cache Alderis
id: cache-alderis
if: ${{ inputs.youslider }}
uses: actions/cache@v5
with:
path: Alderis
key: Alderis-${{ env.ALDERIS_COMMIT }}
- name: Clone Alderis
if: ${{ inputs.youslider && steps.cache-alderis.outputs.cache-hit != 'true' }}
run: git clone --quiet --depth=1 https://github.com/hbang/Alderis.git
- name: Clone YTHoldForSpeed
if: ${{ inputs.ytholdspeed }}
run: git clone --quiet --depth=1 https://github.com/joshuaseltzer/YTHoldForSpeed.git
- name: Clone YouChooseQuality
if: ${{ inputs.youchoose }}
run: git clone --quiet https://github.com/PoomSmart/YouChooseQuality.git
- name: Clone YouShare
if: ${{ inputs.youshare }}
run: git clone --quiet --depth=1 https://github.com/Tonwalter888/YouShare.git
- name: Clone YTweaks
if: ${{ inputs.ytweaks }}
run: git clone --quiet --depth=1 https://github.com/fosterbarnes/YTweaks.git
- name: Clone Gonerino
if: ${{ inputs.gonerino }}
run: git clone --quiet --depth=1 https://github.com/castdrian/Gonerino.git
- name: Clone YouGetCaption
if: ${{ inputs.getcap }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouGetCaption.git
- name: Clone youtube-native-share
if: ${{ inputs.ytshare }}
run: git clone --quiet --depth=1 https://github.com/jkhsjdhjs/youtube-native-share.git
- name: Clone VolumeBoostYT
if: ${{ inputs.volboost }}
run: git clone --quiet --depth=1 https://github.com/VasirakCalgux/VolumeBoostYT.git
- name: Build YouMod
run: |
cd YouMod
echo "YOUMOD_VERSION=$(grep '^Version:' control | cut -d ' ' -f2)" >> $GITHUB_ENV
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youmod.deb
- name: Build YouPiP
if: ${{ inputs.youpip }}
run: |
cd YouPiP
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youpip.deb
- name: Build YTUHD
if: ${{ inputs.ytuhd }}
run: |
cd YTUHD
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ytuhd.deb
- name: Build Return-YouTube-Dislikes
if: ${{ inputs.ryd }}
run: |
cd Return-YouTube-Dislikes
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ryd.deb
- name: Build YouGroupSettings
run: |
cd YouGroupSettings
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ygs.deb
- name: Build YTVideoOverlay
if: ${{ inputs.youpip || inputs.ytuhd || inputs.youquality || inputs.youspeed || inputs.youmute || inputs.youloop || inputs.youshare || inputs.getcap }}
run: |
cd YTVideoOverlay
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ytvo.deb
- name: Build YTABConfig
if: ${{ inputs.abconfig }}
run: |
cd YTABConfig
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ytabconfig.deb
- name: Build YouQuality
if: ${{ inputs.youquality }}
run: |
cd YouQuality
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youquality.deb
- name: Build YouSpeed
if: ${{ inputs.youspeed }}
run: |
cd YouSpeed
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youspeed.deb
- name: Build DontEatMyContent
if: ${{ inputs.demc }}
run: |
cd DontEatMyContent
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/demc.deb
- name: Build YouMute
if: ${{ inputs.youmute }}
run: |
cd YouMute
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ym.deb
- name: Build YouLoop
if: ${{ inputs.youloop }}
run: |
cd YouLoop
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youloop.deb
- name: Build YouSlider
if: ${{ inputs.youslider }}
run: |
cd YouSlider
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youslider.deb
- name: Build Alderis
if: ${{ inputs.youslider }}
run: |
cd Alderis
make clean package DEBUG=0 FINALPACKAGE=1 ARCHS=arm64
mv packages/*.deb ${{ github.workspace }}/alderis.deb
- name: Build YTHoldForSpeed
if: ${{ inputs.ytholdspeed }}
run: |
cd YTHoldForSpeed
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless TARGET=iphone:clang:latest:15.0 ARCHS=arm64
mv packages/*.deb ${{ github.workspace }}/ytholdspeed.deb
- name: Build YouChooseQuality
if: ${{ inputs.youchoose }}
run: |
cd YouChooseQuality
git checkout 1585a3691b2ef0b59d42c40c31639fd8b79e2cd4
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youchoose.deb
- name: Build YouShare
if: ${{ inputs.youshare }}
run: |
cd YouShare
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youshare.deb
- name: Build YTweaks
if: ${{ inputs.ytweaks }}
run: |
cd YTweaks
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ytweaks.deb
- name: Build Gonerino
if: ${{ inputs.gonerino }}
run: |
cd Gonerino
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/gonerino.deb
- name: Build YouGetCaption
if: ${{ inputs.getcap }}
run: |
cd YouGetCaption
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ygc.deb
- name: Build youtube-native-share
if: ${{ inputs.ytshare }}
run: |
cd youtube-native-share
git clone --quiet --depth=1 https://github.com/protocolbuffers/protobuf.git
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless ARCHS=arm64
mv packages/*.deb ${{ github.workspace }}/ytnativeshare.deb
- name: Build VolumeBoostYT
if: ${{ inputs.volboost }}
run: |
cd VolumeBoostYT
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless ARCHS=arm64
mv packages/*.deb ${{ github.workspace }}/volboostyt.deb
- name: Inject Tweaks Into IPA
run: |
tweaks="OpenYouTubeSafariExtension.appex"
for f in *.deb; do
tweaks="$tweaks $f"
done
cyan -i youtube.ipa -o YouMod_${{ env.YT_VERSION }}_v${{ env.YOUMOD_VERSION }}.ipa -uwef $tweaks -n "${{ inputs.display_name }}" -b ${{ inputs.bundle_id }}
- name: Create a Draft Release
uses: softprops/action-gh-release@v3
with:
tag_name: youmod-ipa${{ github.run_number }}
name: YouMod_${{ env.YT_VERSION }}_v${{ env.YOUMOD_VERSION }} (${{ github.run_number }})
files: YouMod_${{ env.YT_VERSION }}_v${{ env.YOUMOD_VERSION }}.ipa
draft: true
- name: Job Summary - Build Complete
run: |
echo -e '### 🛠️ Build IPA with tweaks Complete!' >> $GITHUB_STEP_SUMMARY
- name: Job Summary - Output the Draft Release Link
run: |
echo -e '### 🚀 Draft Release\n\nDraft release has been created successfully! You can view your release here: https://github.com/${{ github.repository }}/releases' >> $GITHUB_STEP_SUMMARY
- name: Job Summary - Cleanup
run: |
echo -e '### 🧹 Cleanup\n\nYou can remove previous GitHub Actions run here: https://github.com/${{ github.repository }}/actions/workflows/delete-old-workflows-run.yml And if you want to delelte old draft releases you have then here: https://github.com/${{ github.repository }}/actions/workflows/delete-old-draft-releases.yml' >> $GITHUB_STEP_SUMMARY