forked from dayanch96/YTLite
-
Notifications
You must be signed in to change notification settings - Fork 337
359 lines (286 loc) · 13.2 KB
/
Copy pathbuildnoytlite.yml
File metadata and controls
359 lines (286 loc) · 13.2 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
name: Build IPA without YTLite
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
demc:
description: "Integrate DontEatMyContent"
default: true
required: false
type: boolean
ytvid:
description: "Integrate YTVideoErrorAlert"
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 without YTLite
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,demc
- 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
- name: Clone Theos
run: git clone --quiet --depth=1 --recurse-submodules https://github.com/theos/theos.git
- name: Download iOS SDK
run: |
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
mv *.sdk $THEOS/sdks
- name: Install cyan and tbd
run: |
pipx install --force 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: 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
mv *.appex ${{ github.workspace }}
- name: Clone YouTubeHeader
run: |
git clone --quiet --depth=1 https://github.com/PoomSmart/YouTubeHeader.git $THEOS/include/YouTubeHeader
if [ "${{ inputs.demc }}" = "true" ]; then
cp -r "$THEOS/include/YouTubeHeader" "$THEOS/include/YTHeaders"
fi
- name: Clone PSHeader
run: git clone --quiet --depth=1 https://github.com/PoomSmart/PSHeader.git $THEOS/include/PSHeader
- name: Clone YouPiP
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouPiP.git
- name: Clone YTUHD
run: git clone --quiet --depth=1 https://github.com/Tonwalter888/YTUHD.git
- name: Clone Return-YouTube-Dislikes
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
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YTVideoOverlay.git
- name: Clone YTABConfig
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YTABConfig.git
- name: Clone YouQuality
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouQuality.git
- name: Clone 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
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouMute.git
- name: Clone YouLoop
run: git clone --quiet --depth=1 https://github.com/bhackel/YouLoop.git
- name: Clone Alderis
run: git clone --quiet --depth=1 https://github.com/hbang/Alderis.git
- name: Clone YouSlider
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouSlider.git
- name: Clone YouChooseQuality
run: git clone --quiet https://github.com/PoomSmart/YouChooseQuality.git
- name: Clone YTSilentVote
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YTSilentVote.git
- name: Clone YouShare
run: git clone --quiet --depth=1 https://github.com/Tonwalter888/YouShare.git
- name: Clone Gonerino
run: git clone --quiet --depth=1 https://github.com/castdrian/Gonerino.git
- name: Clone YTweaks
run: git clone --quiet --depth=1 https://github.com/fosterbarnes/YTweaks.git
- name: Clone YouGetCaption
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouGetCaption.git
- name: Clone YTFlags
run: git clone --quiet --depth=1 https://github.com/Tonwalter888/YTFlags.git
- name: Clone IAmYouTube
run: git clone --quiet --depth=1 https://github.com/PoomSmart/IAmYouTube.git
- name: Clone YTVideoErrorAlert
if: ${{ inputs.ytvid }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YTVideoErrorAlert.git
# - name: Clone VolumeBoostYT
# if: ${{ inputs.volboost }}
# run: git clone --quiet --depth=1 https://github.com/VasirakCalgux/VolumeBoostYT.git
- name: Build 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
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
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
run: |
cd YTVideoOverlay
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ytvo.deb
- name: Build YTABConfig
run: |
cd YTABConfig
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ytabconfig.deb
- name: Build 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
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
run: |
cd YouMute
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ym.deb
- name: Build 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
run: |
cd YouSlider
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youslider.deb
- name: Build Alderis
run: |
cd Alderis
make clean package DEBUG=0 FINALPACKAGE=1 ARCHS=arm64
mv packages/*.deb ${{ github.workspace }}/alderis.deb
- name: Build YouChooseQuality
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 YTSilentVote
run: |
cd YTSilentVote
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ytnovote.deb
- name: Build YouShare
run: |
cd YouShare
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/youshare.deb
- name: Build 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
run: |
cd YouGetCaption
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ygc.deb
- name: Build YTweaks
run: |
cd YTweaks
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ytweaks.deb
- name: Build YTFlags
run: |
cd YTFlags
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ytflags.deb
- name: Build IAmYouTube
run: |
cd IAmYouTube
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/imyt.deb
- name: Build YTVideoErrorAlert
if: ${{ inputs.ytvid }}
run: |
cd YTVideoErrorAlert
make clean package DEBUG=0 FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ${{ github.workspace }}/ytvideoerror.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 YTLitePlusEXTRA_NoYTLite_${{ env.YT_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: ytliteplusextra-ipa-noytlite${{ github.run_number }}
name: YTLitePlusEXTRA_NoYTLite_${{ env.YT_VERSION }} (${{ github.run_number }})
files: YTLitePlusEXTRA_NoYTLite_${{ env.YT_VERSION }}.ipa
draft: true
- name: Job Summary - Build Conplete
run: |
echo -e '### 🛠️ Build IPA wtihout YTLite 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