forked from dayanch96/YTLite
-
Notifications
You must be signed in to change notification settings - Fork 0
168 lines (144 loc) · 5.71 KB
/
ytp_tweaks.yml
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
name: YouTube Plus + YouPiP, YTUHD and RYD
on:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
inputs:
ipa_url:
description: "The direct URL to the decrypted IPA file"
default: ""
required: false
type: string
tweak_version:
description: "The version of the tweak to use. Enter the version manually from dayanch96/YTLite/releases or leave default"
default: "5.0.2"
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: macos-12
permissions:
contents: write
steps:
- name: Checkout Main
uses: actions/[email protected]
with:
path: main
submodules: recursive
- name: Install Dependencies
run: brew install make ldid
- name: Set PATH environment variable
run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
- name: Cache Theos
id: theos
uses: actions/[email protected]
env:
cache-name: theos_cache
with:
path: theos/
key: ${{ env.cache-name }}
restore-keys: ${{ env.cache-name }}
- name: Setup Theos
if: steps.theos.outputs.cache-hit != 'true'
uses: actions/[email protected]
with:
repository: theos/theos
ref: 3da31488281ecf4394d10302d2629607f4a1aa07
path: ${{ github.workspace }}/theos
submodules: recursive
- name: Download iOS SDK
if: 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 iPhoneOS13.7.sdk
git checkout
mv *.sdk $THEOS/sdks
env:
THEOS: ${{ github.workspace }}/theos
- name: Install cyan
run: pip install https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip
- name: Download IPA (Auto) # good up to 37d><43d
if: ${{ !inputs.ipa_url }}
uses: level3tjg/decryptedappstore-action@main
with:
appstore_url: "https://apps.apple.com/us/app/youtube-watch-listen-stream/id544007664"
cache: true
path: ${{ github.workspace }}/youtube.ipa
token: ${{ secrets.DECRYPTEDAPPSTORE_SESSION_TOKEN }} # Get token: https://imgur.com/iERxx4W.png and how to set it: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository
- name: Download YouTube
id: download_youtube
if: ${{ inputs.ipa_url }}
run: wget "${{ inputs.ipa_url }}" --no-verbose -O ${{ github.workspace }}/youtube.ipa
- 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)
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
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
env:
THEOS: ${{ github.workspace }}/theos
- name: Clone YouPiP
run: |
cd ${{ github.workspace }}
git clone --quiet --depth=1 https://github.com/PoomSmart/YouPiP.git
- name: Clone YTUHD
run: |
cd ${{ github.workspace }}
git clone --quiet --depth=1 https://github.com/PoomSmart/YTUHD.git
- name: Clone Return-YouTube-Dislikes
run: |
cd ${{ github.workspace }}
git clone --quiet --depth=1 https://github.com/PoomSmart/Return-YouTube-Dislikes.git
- name: Build 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
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
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: Inject tweaks into IPA
run: |
cyan -i youtube.ipa -o YouTubePlus_${{ inputs.tweak_version }}_Tweaks.ipa \
-uwf ytplus.deb OpenYoutubeSafariExtension.appex youpip.deb ytuhd.deb ryd.deb
- name: Upload to GitHub Releases
uses: softprops/[email protected]
with:
tag_name: v${{ github.run_number }}
name: YouTubePlus v${{ inputs.tweak_version }} + Tweaks (${{ github.run_number }})
files: YouTubePlus_${{ inputs.tweak_version }}_Tweaks.ipa
draft: true