forked from dayanch96/YTMusicUltimate
-
Notifications
You must be signed in to change notification settings - Fork 65
242 lines (200 loc) · 8.28 KB
/
Copy pathmain.yml
File metadata and controls
242 lines (200 loc) · 8.28 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
name: Build and Release YTMusicUltimate and MaxMusic
on:
workflow_dispatch:
inputs:
enable_rymd:
description: "Integrate Return-YouTube-Music-Dislikes (MaxMusic)"
type: boolean
required: true
default: false
enable_ytmabc:
description: "Integrate YTMABConfig (MaxMusic)"
type: boolean
required: true
default: false
enable_youmusicpip:
description: "Integrate YouMusicPiP (MaxMusic)"
type: boolean
required: true
default: false
enable_volumeboostyt:
description: "Integrate VolumeBoostYT (MaxMusic)"
type: boolean
required: true
default: false
ipa_url:
description: "URL to the decrypted IPA file"
default: ""
required: true
type: string
display_name:
description: "App Name (Optional)"
default: "YouTube Music"
required: true
type: string
bundle_id:
description: "BundleID (Optional)"
default: "com.google.ios.youtubemusic"
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build app
runs-on: macos-latest
permissions:
contents: write
steps:
- name: Checkout Main
uses: actions/checkout@v6.0.2
with:
path: main
submodules: recursive
- name: Hide sensitive inputs
uses: levibostian/action-hide-sensitive-inputs@v1
with:
exclude_inputs: bundle_id,display_name,enable_rymd,enable_ytmabc,enable_youmusicpip,enable_volumeboostyt
- name: Validate IPA URL
run: |
curl -L -r 0-1023 -o sample.part "${{ inputs.ipa_url }}" > /dev/null 2>&1
file_type=$(file --mime-type -b sample.part)
if [[ "$file_type" != "application/x-ios-app" && "$file_type" != "application/zip" ]]; then
echo "::error::Validation failed: The file is not a valid IPA file. Detected type: $file_type."
exit 1
fi
- name: Install Dependencies
run: brew install make ldid
- name: Set PATH environment variables
run: |
echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
echo "THEOS=${{ github.workspace }}/theos" >> $GITHUB_ENV
- name: Cache Theos
id: theos
uses: actions/cache@v5.0.3
env:
cache-name: theos_cache_9bc7340
with:
path: theos/
key: ${{ env.cache-name }}
restore-keys: ${{ env.cache-name }}
- name: Setup Theos
if: steps.theos.outputs.cache-hit != 'true'
uses: actions/checkout@v6.0.2
with:
repository: theos/theos
ref: 9bc73406cf80b711ef4d02c15ff1dedc4478a275
path: 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.git
cd sdks
git sparse-checkout set --no-cone iPhoneOS16.5.sdk
git checkout
mv *.sdk $THEOS/sdks
- name: Install cyan
run: pipx install --force https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip
- name: Download YouTube Music
run: wget "${{ inputs.ipa_url }}" --no-verbose -O ytm.ipa
- name: Get YouTube Music Version
run: |
unzip -q ytm.ipa -d ytmextracted
echo "YTM_VERSION=$(grep -A 1 '<key>CFBundleVersion</key>' ytmextracted/Payload/YouTubeMusic.app/Info.plist | grep '<string>' | awk -F'[><]' '{print $3}')" >> $GITHUB_ENV
- name: Clone YouTubeHeader
run: |
if [ -d "$THEOS/include/YouTubeHeader" ]; then
cd $THEOS/include/YouTubeHeader && git pull
else
cd $THEOS/include && git clone --quiet --depth=1 https://github.com/PoomSmart/YouTubeHeader.git
fi
- name: Clone PSHeader
run: |
if [ -d "$THEOS/include/PSHeader" ]; then
cd $THEOS/include/PSHeader && git pull
else
cd $THEOS/include && git clone --quiet --depth=1 https://github.com/PoomSmart/PSHeader.git
fi
- name: Clone YouTubeMusicHeader
run: |
if [ -d "$THEOS/include/YouTubeMusicHeader" ]; then
cd $THEOS/include/YouTubeMusicHeader && git pull
else
cd $THEOS/include && git clone --quiet --depth=1 https://github.com/PoomSmart/YouTubeMusicHeader.git
fi
- name: Clone Return-YouTube-Dislikes (for Return-YouTube-Music-Dislikes)
if: ${{ inputs.enable_rymd }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/Return-YouTube-Dislikes.git
- name: Clone YouPiP (for YouMusicPiP)
if: ${{ inputs.enable_youmusicpip }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouPiP.git
- name: Clone Return-YouTube-Music-Dislikes
if: ${{ inputs.enable_rymd }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/Return-YouTube-Music-Dislikes.git
- name: Clone YTMABConfig
if: ${{ inputs.enable_ytmabc }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YTMABConfig.git
- name: Clone YouMusicPiP
if: ${{ inputs.enable_youmusicpip }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouMusicPiP.git
- name: Clone VolumeBoostYT
if: ${{ inputs.enable_volumeboostyt }}
run: git clone --quiet --depth=1 https://github.com/VasirakCalgux/VolumeBoostYT.git
- name: Build Return-YouTube-Music-Dislikes
if: ${{ inputs.enable_rymd }}
run: |
cd Return-YouTube-Music-Dislikes && make package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ../rymd.deb
- name: Build YTMABConfig
if: ${{ inputs.enable_ytmabc }}
run: |
cd YTMABConfig && make package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ../ytmabc.deb
- name: Build YouMusicPiP
if: ${{ inputs.enable_youmusicpip }}
run: |
cd YouMusicPiP && make package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
mv packages/*.deb ../youmusicpip.deb
- name: Build VolumeBoostYT
if: ${{ inputs.enable_volumeboostyt }}
run: |
cd VolumeBoostYT && make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ../volumeboostyt.deb
- name: Download YTMusicUltimate 2.4.1 With Fixed Downloads
run: |
curl -L -o ./ytmult.deb https://files.catbox.moe/u8c7df.deb
- name: Determines the Release Title Prefix
run: |
if [ "${{ inputs.enable_rymd }}" = "false" ] && \
[ "${{ inputs.enable_volumeboostyt }}" = "false" ] && \
[ "${{ inputs.enable_youmusicpip }}" = "false" ] && \
[ "${{ inputs.enable_ytmabc }}" = "false" ]; then
echo "RELEASE_PREFIX=YTMusicUltimate" >> $GITHUB_ENV
else
echo "RELEASE_PREFIX=MaxMusic" >> $GITHUB_ENV
fi
- name: Inject tweaks into provided IPA
run: |
cyan -i ytm.ipa -o ${{ env.RELEASE_PREFIX }}_2.4.1_${{ env.YTM_VERSION }}.ipa -uwsf *.deb -n "${{ inputs.display_name }}" -b ${{ inputs.bundle_id }}
- name: Determines the Release Tag Prefix
run: |
if [ "${{ inputs.enable_rymd }}" = "false" ] && \
[ "${{ inputs.enable_volumeboostyt }}" = "false" ] && \
[ "${{ inputs.enable_youmusicpip }}" = "false" ] && \
[ "${{ inputs.enable_ytmabc }}" = "false" ]; then
echo "TAG_PREFIX=YTMU" >> $GITHUB_ENV
else
echo "TAG_PREFIX=MaxMusic" >> $GITHUB_ENV
fi
- name: Create Release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ env.TAG_PREFIX }}_${{ env.YTM_VERSION }}_2.4.1_(${{ github.run_number }})
name: ${{ env.RELEASE_PREFIX }} 2.4.1 and ${{ env.YTM_VERSION }}
files: ${{ env.RELEASE_PREFIX }}_2.4.1_${{ env.YTM_VERSION }}.ipa
draft: true
- name: Output Release URL
run: |
echo "::notice::Release available at: https://github.com/${{ github.repository }}/releases"