-
Notifications
You must be signed in to change notification settings - Fork 20
301 lines (266 loc) · 13.2 KB
/
Build and Release.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
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
name: Build and Release
on:
workflow_dispatch:
inputs:
SPOTURL:
description: 'Direct URL to Spotify .ipa'
required: true
CHANGEVERSION:
description: 'SpotC++ Version Number'
required: false
EEVEEVERSION:
description: 'EeveeSpotify Version'
required: false
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up variables
id: setup
run: |
echo "EEVEEVERSION=${{ github.event.inputs.EEVEEVERSION }}" >> $GITHUB_ENV
echo "CHANGEVERSION=${{ github.event.inputs.CHANGEVERSION }}" >> $GITHUB_ENV
echo "SPOTURL=${{ github.event.inputs.SPOTURL }}" >> $GITHUB_ENV
- name: Install Pyzule
run: bash -c "$(curl https://raw.githubusercontent.com/asdfzxcvbn/pyzule/main/install-pyzule.sh)"
- name: Get EeveeSpotify release tags
id: get-tags
run: |
tags=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/tags | jq -r '.[].name')
echo "tags=$tags" >> $GITHUB_ENV
- name: Determine EeveeSpotify version
id: determine-version
run: |
if [ -n "${{ env.EEVEEVERSION }}" ]; then
REALEEVEEVERSION=$(echo $tags | tr ' ' '\n' | grep "${{ env.EEVEEVERSION }}" | head -n 1)
if [ -z "$REALEEVEEVERSION" ]; then
echo "No matching tag found for EEVEEVERSION: ${{ env.EEVEEVERSION }}"
exit 1
fi
else
REALEEVEEVERSION=$(echo $tags | tr ' ' '\n' | head -n 1)
fi
echo "REALEEVEEVERSION=$REALEEVEEVERSION" >> $GITHUB_ENV
- name: Create Build Components folder
run: mkdir -p "Build Components"
- name: Set VirusTotal key as env variable
run: echo "VIRUSTOTALKEY=${{ secrets.VIRUSTOTALKEY }}" >> $GITHUB_ENV
- name: Download Spotify IPA
run: |
curl -L "${{ github.event.inputs.SPOTURL }}" -o "Build Components/Spotify.ipa"
echo "spotifypath=Build Components/Spotify.ipa" >> $GITHUB_ENV
env:
SPOTURL: ${{ github.event.inputs.SPOTURL }}
- name: Upload Spotify IPA to VirusTotal
if: ${{ env.VIRUSTOTALKEY }}
uses: crazy-max/ghaction-virustotal@v4
id: vt-spotify
with:
files: "Build Components/Spotify.ipa"
vt_api_key: ${{ env.VIRUSTOTALKEY }}
verbose: false
- name: Set VirusTotal Analysis URL for Spotify IPA
if: ${{ env.VIRUSTOTALKEY }}
run: echo "VTVANILLASPOTIFY=${{ steps.vt-spotify.outputs.analysis }}" >> $GITHUB_ENV
- name: Download EeveeSpotify .deb files
run: |
eevee_asset=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases/tags/${{ steps.get-eevee-tag.outputs.REALEEVEEVERSION }} | jq -r '.assets[] | select(.name | startswith("com.eevee.spotify") and endswith("iphoneos-arm.deb")).browser_download_url')
curl -L "$eevee_asset" -o "Build Components/Eevee-arm"
echo "eevee-arm=Build Components/Eevee-arm" >> $GITHUB_ENV
env:
REALEEVEEVERSION: ${{ steps.get-eevee-tag.outputs.REALEEVEEVERSION }}
- name: Upload EeveeSpotify to VirusTotal
if: ${{ env.VIRUSTOTALKEY }}
uses: crazy-max/ghaction-virustotal@v4
id: vt-eevee
with:
files: "Build Components/Eevee-arm"
vt_api_key: ${{ env.VIRUSTOTALKEY }}
verbose: false
- name: Set VirusTotal Analysis URL for EeveeSpotify
if: ${{ env.VIRUSTOTALKEY }}
run: echo "VTEEVEE=${{ steps.vt-eevee.outputs.analysis }}" >> $GITHUB_ENV
- name: Download SwiftProtobuf .deb file
run: |
protobuf_asset=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases/tags/$REALEEVEEVERSION | jq -r '.assets[] | select(.name | startswith("org.swift.protobuf.swiftprotobuf") and endswith("iphoneos-arm.deb")).browser_download_url')
protobuf_version=$(echo "$protobuf_asset" | grep -oP '(?<=org.swift.protobuf.swiftprotobuf_).*(?=_iphoneos-arm.deb)')
curl -L "$protobuf_asset" -o "Build Components/SwiftProtobuf-arm"
echo "swiftprotobuf=Build Components/SwiftProtobuf-arm" >> $GITHUB_ENV
echo "SWIFTPROTOBUFVERSION=$protobuf_version" >> $GITHUB_ENV
env:
REALEEVEEVERSION: ${{ env.REALEEVEEVERSION }}
- name: Upload SwiftProtobuf to VirusTotal
if: ${{ env.VIRUSTOTALKEY }}
uses: crazy-max/ghaction-virustotal@v4
id: vt-swiftprotobuf
with:
files: "Build Components/SwiftProtobuf-arm"
vt_api_key: ${{ env.VIRUSTOTALKEY }}
verbose: false
- name: Set VirusTotal Analysis URL for SwiftProtobuf
if: ${{ env.VIRUSTOTALKEY }}
run: echo "VTSWIFTPROTOBUF=${{ steps.vt-swiftprotobuf.outputs.analysis }}" >> $GITHUB_ENV
- name: Download Orion .deb file from Chariz repo
run: |
orion_url=$(curl -s https://repo.chariz.com/Packages | jq -r '.[] | select(.package=="dev.theos.orion14").versions[0].depiction.url')
orion_version=$(curl -s "$orion_url" | grep -oP '(?<=<h1 class="text-h3">Orion ).*(?=</h1>)')
orion_download_url=$(curl -s "$orion_url" | grep -oP '(?<=<a class="button" href=").*(?=">Download</a>)')
curl -L "$orion_download_url" -o "Build Components/orion"
echo "orion=Build Components/orion" >> $GITHUB_ENV
echo "ORIONVERSION=$orion_version" >> $GITHUB_ENV
- name: Upload Orion to VirusTotal
if: ${{ env.VIRUSTOTALKEY }}
uses: crazy-max/ghaction-virustotal@v4
id: vt-orion
with:
files: "Build Components/orion"
vt_api_key: ${{ env.VIRUSTOTALKEY }}
verbose: false
- name: Set VirusTotal Analysis URL for Orion
if: ${{ env.VIRUSTOTALKEY }}
run: echo "VTORION=${{ steps.vt-orion.outputs.analysis }}" >> $GITHUB_ENV
- name: Download Sposify .deb file from Dynastic repo
run: |
sposify_url=$(curl -s https://repo.dynastic.co/api/Packages | jq -r '.[] | select(.package=="com.spos").version')
sposify_version=$(echo $sposify_url | jq -r .version)
sposify_download_url=$(echo $sposify_url | jq -r .url)
curl -L "$sposify_download_url" -o "Build Components/sposify"
echo "sposify=Build Components/sposify" >> $GITHUB_ENV
echo "SPOSIFYVERSION=$sposify_version" >> $GITHUB_ENV
- name: Upload Sposify to VirusTotal
if: ${{ env.VIRUSTOTALKEY }}
uses: crazy-max/ghaction-virustotal@v4
id: vt-sposify
with:
files: "Build Components/sposify"
vt_api_key: ${{ env.VIRUSTOTALKEY }}
verbose: false
- name: Set VirusTotal Analysis URL for Sposify
if: ${{ env.VIRUSTOTALKEY }}
run: echo "VTSPOSIFY=${{ steps.vt-sposify.outputs.analysis }}" >> $GITHUB_ENV
- name: Download SposifyFix .deb file from Level3tjg repo
run: |
sposifyfix_url=$(curl -s https://level3tjg.me/repo/Packages | jq -r '.[] | select(.package=="com.level3tjg.sposifyfix").version')
sposifyfix_version=$(echo $sposifyfix_url | jq -r .version)
sposifyfix_download_url=$(echo $sposifyfix_url | jq -r .url)
curl -L "$sposifyfix_download_url" -o "Build Components/sposifyfix"
echo "sposifyfix=Build Components/sposifyfix" >> $GITHUB_ENV
echo "SPOSIFYFIXVERSION=$sposifyfix_version" >> $GITHUB_ENV
- name: Upload SposifyFix to VirusTotal
if: ${{ env.VIRUSTOTALKEY }}
uses: crazy-max/ghaction-virustotal@v4
id: vt-sposifyfix
with:
files: "Build Components/sposifyfix"
vt_api_key: ${{ env.VIRUSTOTALKEY }}
verbose: false
- name: Set VirusTotal Analysis URL for SposifyFix
if: ${{ env.VIRUSTOTALKEY }}
run: echo "VTSPOSIFYFIX=${{ steps.vt-sposifyfix.outputs.analysis }}" >> $GITHUB_ENV
- name: Clone OpenSpotifySafariExtension
run: git clone https://github.com/whoeevee/OpenSpotifySafariExtension
- name: Copy OpenSpotifySafariExtension.appex to Build Components
run: |
cp OpenSpotifySafariExtension/OpenSpotifySafariExtension.appex "Build Components/"
echo "EXTCOMMIT=$(git -C OpenSpotifySafariExtension rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Compress OpenSpotifySafariExtension to zip
run: |
cd OpenSpotifySafariExtension
zip -r ../Build\ Components/OpenSpotifySafariExtension.zip ./*
- name: Upload OpenSpotifySafariExtension to VirusTotal
if: ${{ env.VIRUSTOTALKEY }}
uses: crazy-max/ghaction-virustotal@v4
id: vt-openspotify
with:
files: "Build Components/OpenSpotifySafariExtension.zip"
vt_api_key: ${{ env.VIRUSTOTALKEY }}
verbose: false
- name: Set VirusTotal Analysis URL for OpenSpotifySafariExtension
if: ${{ env.VIRUSTOTALKEY }}
run: echo "VTEXT=${{ steps.vt-openspotify.outputs.analysis }}" >> $GITHUB_ENV
- name: Duplicate and unzip Spotify.ipa
run: |
cp "Build Components/Spotify.ipa" "Build Components/SpotifyAnylises.zip"
unzip "Build Components/SpotifyAnylises.zip" -d payload
- name: Extract info.plist from Spotify
run: |
cp payload/Payload/Spotify.app/Info.plist "Build Components/Info.plist"
echo "VANILLASPOTIFYVERSION=$(defaults read "Build Components/Info.plist" CFBundleVersion)" >> $GITHUB_ENV
- name: Modify Spotify with OpenSpotifySafariExtension.appex
run: |
cp "Build Components/OpenSpotifySafariExtension.appex" payload/Payload/Spotify.app/PlugIns/
cd payload
zip -r ../Build\ Components/SpotifyEXT.zip ./*
cd ../Build\ Components
mv SpotifyEXT.zip SpotifyEXT.ipa
echo "spotifyEXTpath=Build Components/SpotifyEXT.ipa" >> $GITHUB_ENV
rm -rf payload
rm SpotifyAnylises.zip
rm Info.plist
- name: Set Change Version
id: set-change-version
run: |
CHANGEVERSION="${{ github.event.inputs.CHANGEVERSION }}"
if [ -z "$CHANGEVERSION" ]; then
latest_tag=$(curl -s https://api.github.com/repos/SpotCompiled/SpotC-Plus-Plus/releases/latest | jq -r .tag_name)
base_version=${latest_tag#v}
IFS='.' read -ra ADDR <<< "$base_version"
last_number=${ADDR[2]}
new_last_number=$((last_number + 1))
CHANGEVERSION="${ADDR[0]}.${ADDR[1]}.$new_last_number"
fi
echo "CHANGEVERSION=$CHANGEVERSION" >> $GITHUB_ENV
- name: Set Components Path
run: echo "componentspath=Build Components" >> $GITHUB_ENV
- name: Run Pyzule
run: pyzule -i ${{ env.spotifyEXTpath }} -o ${{ env.componentspath }}/SpotifyPatched.ipa -v ${{ env.CHANGEVERSION }} -b com.yodaluca23.SpotCPlusPlus -f ${{ env.sposifyfix }} ${{ env.sposify }} ${{ env.orion }} ${{ env.swiftprotobuf }} ${{ env.eevee-arm }} -u
- name: Upload SpotifyPatched.ipa to VirusTotal
if: ${{ env.VIRUSTOTALKEY }}
uses: crazy-max/ghaction-virustotal@v4
id: vt-spotc
with:
files: "${{ env.componentspath }}/SpotifyPatched.ipa"
vt_api_key: ${{ env.VIRUSTOTALKEY }}
verbose: false
- name: Set VirusTotal Analysis URL for SpotC++
if: ${{ env.VIRUSTOTALKEY }}
run: echo "VTSPOTC=${{ steps.vt-spotc.outputs.analysis }}" >> $GITHUB_ENV
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
tag: "v${{ env.CHANGEVERSION }}"
name: "SpotC++ v${{ env.CHANGEVERSION }}"
draft: true
files: ${{ env.componentspath }}/SpotifyPatched.ipa
file_glob: true
body: |
## ChangeLog
- Updated [EeveeSpotify](https://github.com/whoeevee/EeveeSpotify) to ${{ env.REALEEVEEVERSION }}
$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases/tags/${{ env.REALEEVEEVERSION }} | jq -r '.body' | sed 's/^/- (EeveeSpotify) /')
- Updated Spotify to version ${{ env.VANILLASPOTIFYVERSION }}
***
Vanilla IPA decrypted using [a fork of BagBak](https://github.com/TbhLovers/bagbak), on my personal MacBook Air and Jailbroken iPhone XR running [Dopamine](https://github.com/opa334/Dopamine), feel free to contact me with questions about this environment.
App .ipa modified and tweaks injected using Pyzule with the github Action Workflow.
$(if [ -n "${{ secrets.VIRUSTOTALKEY }}" ]; then
echo "<details>
<summary>Version Details & VirusTotal Results</summary><br>
Spotify Version: v${{ env.VANILLASPOTIFYVERSION }}
[Vanilla Spotify VirusTotal](${{ env.VTVANILLASPOTIFY }})<br>
EeveeSpotify Version: ${{ env.REALEEVEEVERSION }}
[EeveeSpotify .deb VirusTotal](${{ env.VTEEVEE }})<br>
Sposify v${{ env.SPOSIFYVERSION }}
[Sposify VirusTotal](${{ env.VTSPOSIFY }})<br>
OpenSpotifySafariExtension Commit: ${{ env.EXTCOMMIT }}
[OpenSpotifySafariExtension Repo Compressed .zip VirusTotal](${{ env.VTEXT }})<br>
Sposify Fix v${{ env.SPOSIFYFIXVERSION }}
[Sposify Fix VirusTotal](${{ env.VTSPOSIFYFIX }})<br>
Orion Runtime (iOS 14 - 16) v${{ env.ORIONVERSION }}
[Orion Runtime (iOS 14 - 16) .deb VirusTotal](${{ env.VTORION }})<br>
SwiftProtobuf Framework v${{ env.SWIFTPROTOBUFVERSION }}
[SwiftProtobuf Framework .deb VirusTotal](${{ env.VTSWIFTPROTOBUF }})<br>
SpotC++ Version: v${{ env.CHANGEVERSION }}
[SpotC++ VirusTotal](${{ env.VTSPOTC }})
<br>
</details>"; fi)