Repository navigation
349 lines (300 loc) · 11.6 KB
/
Copy pathcyan_ts.yml
File metadata and controls
349 lines (300 loc) · 11.6 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
name: Generate TrollFools/Cyan files
on:
workflow_dispatch:
inputs:
create_cyan:
description: "Generate .cyan file"
type: boolean
required: true
default: true
create_tf:
description: "Generate .zip for TrollFools"
type: boolean
required: true
default: true
enable_youpip:
description: "Integrate YouPiP"
type: boolean
required: true
default: false
enable_ytuhd:
description: "Integrate YTUHD"
type: boolean
required: true
default: false
enable_yq:
description: "Integrate YouQuality"
type: boolean
required: true
default: false
enable_ryd:
description: "Integrate Return YouTube Dislikes"
type: boolean
required: true
default: false
enable_demc:
description: "Integrate DontEatMyContent"
type: boolean
required: true
default: false
tweak_version:
description: "The version of the tweak to use. Enter the version manually from dayanch96/YTLite/releases or leave default"
default: "5.2b2"
required: true
type: string
display_name:
description: "App Name (Optional)"
default: "YouTube"
required: true
type: string
bundle_id:
description: "BundleID (Optional)"
default: "com.google.ios.youtube"
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name:
runs-on: macos-latest
permissions:
contents: write
steps:
- name: Checkout Main
uses: actions/checkout@v4.1.1
with:
path: main
submodules: recursive
- name: Check Inputs
if: ${{ !inputs.create_cyan && !inputs.create_tf }}
run: |
echo "No output format selected."
exit 0
- name: Install Dependencies
run: brew install make ldid dpkg
- name: Set PATH environment variable
run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
- name: Cache Theos
if: ${{ inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_demc }}
id: theos
uses: actions/cache@v4
env:
cache-name: theos_cache_67db2ab
with:
path: theos/
key: ${{ env.cache-name }}
restore-keys: ${{ env.cache-name }}
- name: Setup Theos
if: ${{ (inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_demc) && steps.theos.outputs.cache-hit != 'true' }}
uses: actions/checkout@v4.1.7
with:
repository: theos/theos
ref: 67db2ab8d950910161730de77c322658ea3e6b44
path: ${{ github.workspace }}/theos
submodules: recursive
- name: Download iOS SDK
if: ${{ (inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_demc) && steps.theos.outputs.cache-hit != 'true' }}
run: |
git clone --quiet -n --depth=1 --filter=tree:0 https://github.com/theos/sdks/
cd sdks
git sparse-checkout set --no-cone iPhoneOS16.5.sdk
git checkout
mv *.sdk $THEOS/sdks
env:
THEOS: ${{ github.workspace }}/theos
- name: Install cyan
if: ${{ inputs.create_cyan }}
run: pipx install --force https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip
- name: Download YouTube Plus
id: download_ytp
run: |
deb_url="https://github.com/dayanch96/YTLite/releases/download/v${{ inputs.tweak_version }}/com.dvntm.ytlite_${{ inputs.tweak_version }}_iphoneos-arm.deb"
wget "$deb_url" --no-verbose -O ${{ github.workspace }}/ytplus.deb
- name: Clone Open in YouTube (Safari extension)
if: ${{ inputs.create_cyan }}
run: |
git clone --quiet -n --depth=1 --filter=tree:0 https://github.com/CokePokes/YoutubeExtensions/
cd YoutubeExtensions
git sparse-checkout set --no-cone OpenYoutubeSafariExtension.appex
git checkout
mv *.appex ${{ github.workspace }}
- name: Clone YouTubeHeader
if: ${{ inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_demc }}
run: |
if [ -d "$THEOS/include/YouTubeHeader" ]; then
echo "YouTubeHeader exists. Pulling latest changes..."
cd $THEOS/include/YouTubeHeader
git pull
else
echo "YouTubeHeader does not exist. Cloning repository..."
cd $THEOS/include
git clone --quiet --depth=1 https://github.com/PoomSmart/YouTubeHeader.git
fi
if [ "${{ inputs.enable_demc }}" = "true" ]; then
echo "Copying YouTubeHeader to YTHeaders..."
rm -rf "$THEOS/include/YTHeaders"
cp -r "$THEOS/include/YouTubeHeader" "$THEOS/include/YTHeaders"
fi
env:
THEOS: ${{ github.workspace }}/theos
- name: Clone PSHeader
if: ${{ inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_demc }}
run: |
if [ -d "$THEOS/include/PSHeader" ]; then
echo "PSHeader exists. Pulling latest changes..."
cd $THEOS/include/PSHeader
git pull
else
echo "PSHeader does not exist. Cloning repository..."
cd $THEOS/include
git clone --quiet --depth=1 https://github.com/PoomSmart/PSHeader.git
fi
env:
THEOS: ${{ github.workspace }}/theos
- name: Clone YouPiP
if: ${{ inputs.enable_youpip }}
run: |
cd ${{ github.workspace }}
git clone --quiet --depth=1 https://github.com/PoomSmart/YouPiP.git
- name: Clone YTUHD
if: ${{ inputs.enable_ytuhd }}
uses: actions/checkout@v4.1.7
with:
repository: PoomSmart/YTUHD
ref: 0f59b38817d554ab692a0053456319847a6ab1a1
path: ${{ github.workspace }}/YTUHD
- name: Clone Return-YouTube-Dislikes
if: ${{ inputs.enable_ryd }}
run: |
cd ${{ github.workspace }}
git clone --quiet --depth=1 https://github.com/PoomSmart/Return-YouTube-Dislikes.git
- name: Clone YouGroupSettings
if: ${{ inputs.enable_demc }}
run: |
cd ${{ github.workspace }}
git clone --quiet --depth=1 https://github.com/PoomSmart/YouGroupSettings.git
- name: Clone YouQuality
if: ${{ inputs.enable_yq }}
run: |
cd ${{ github.workspace }}
git clone --quiet --depth=1 https://github.com/PoomSmart/YouQuality.git
- name: Clone YTVideoOverlay
if: ${{ inputs.enable_yq || inputs.enable_youpip }}
run: |
cd ${{ github.workspace }}
git clone --quiet --depth=1 https://github.com/PoomSmart/YTVideoOverlay.git
- name: Clone DontEatMyContent
if: ${{ inputs.enable_demc }}
run: |
cd ${{ github.workspace }}
git clone --quiet --depth=1 --recurse-submodules https://github.com/therealFoxster/DontEatMyContent.git
- name: Build YouPiP
if: ${{ inputs.enable_youpip }}
run: |
cd ${{ github.workspace }}/YouPiP
make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ${{ github.workspace }}/youpip.deb
env:
THEOS: ${{ github.workspace }}/theos
- name: Build YTUHD
if: ${{ inputs.enable_ytuhd }}
run: |
cd ${{ github.workspace }}/YTUHD
make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ${{ github.workspace }}/ytuhd.deb
env:
THEOS: ${{ github.workspace }}/theos
- name: Build Return-YouTube-Dislikes
if: ${{ inputs.enable_ryd }}
run: |
cd ${{ github.workspace }}/Return-YouTube-Dislikes
make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ${{ github.workspace }}/ryd.deb
env:
THEOS: ${{ github.workspace }}/theos
- name: Build YouGroupSettings
if: ${{ inputs.enable_demc }}
run: |
cd ${{ github.workspace }}/YouGroupSettings
make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ${{ github.workspace }}/ygs.deb
env:
THEOS: ${{ github.workspace }}/theos
- name: Build YouQuality
if: ${{ inputs.enable_yq }}
run: |
cd ${{ github.workspace }}/YouQuality
make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ${{ github.workspace }}/yq.deb
env:
THEOS: ${{ github.workspace }}/theos
- name: Build YTVideoOverlay
if: ${{ inputs.enable_yq || inputs.enable_youpip }}
run: |
cd ${{ github.workspace }}/YTVideoOverlay
make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ${{ github.workspace }}/ytvo.deb
env:
THEOS: ${{ github.workspace }}/theos
- name: Build DontEatMyContent
if: ${{ inputs.enable_demc }}
run: |
cd ${{ github.workspace }}/DontEatMyContent
make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ${{ github.workspace }}/demc.deb
env:
THEOS: ${{ github.workspace }}/theos
- name: Generate .cyan file
if: ${{ inputs.create_cyan }}
run: |
tweaks="ytplus.deb OpenYoutubeSafariExtension.appex"
for deb in youpip.deb ytuhd.deb ryd.deb ygs.deb yq.deb ytvo.deb demc.deb; do
if [ -f "$deb" ]; then
tweaks="$tweaks $deb"
fi
done
cgen -uwef $tweaks -n "${{ inputs.display_name }}" -b ${{ inputs.bundle_id }} -o cyan_YouTubePlus_${{ inputs.tweak_version }}.cyan
- name: Generate .zip file for TrollFools
if: ${{ inputs.create_tf }}
run: |
mkdir -p ytp_tf
for f in *.deb; do
if [ -f "$f" ]; then
echo "Extracting $f..."
mkdir -p tmp_deb
dpkg-deb -x "$f" tmp_deb
find tmp_deb -type f -name "*.dylib" -exec cp -R {} ytp_tf/ \;
find tmp_deb -type d -name "*.bundle" -exec cp -R {} ytp_tf/ \;
rm -rf tmp_deb
fi
done
echo "Zipping..."
cd ytp_tf
zip -r "../TrollFools_YouTubePlus_${{ inputs.tweak_version }}.zip" .
cd ..
rm -rf ytp_tf
- name: Set output file list
id: filelist
run: |
files=""
if [ "${{ inputs.create_cyan }}" = "true" ]; then
files="${files}cyan_YouTubePlus_${{ inputs.tweak_version }}.cyan"$'\n'
fi
if [ "${{ inputs.create_tf }}" = "true" ]; then
files="${files}TrollFools_YouTubePlus_${{ inputs.tweak_version }}.zip"$'\n'
fi
echo -e "files<<EOF" >> $GITHUB_OUTPUT
echo -e "$files" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Upload to GitHub Releases
uses: softprops/action-gh-release@v2.0.1
with:
tag_name: ytp-${{ github.run_number }}
name: YouTubePlus v${{ inputs.tweak_version }}_cyan_trollfools (${{ github.run_number }})
files: ${{ steps.filelist.outputs.files }}
draft: true
- name: Output Release URL
run: |
echo "::notice::Release available at: https://github.com/${{ github.repository }}/releases"