-
Notifications
You must be signed in to change notification settings - Fork 22
244 lines (222 loc) · 12 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
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:
setup:
runs-on: macos-latest
steps:
- name: Check and Install Xcode CLI tools
run: |
if ! xcode-select -p >/dev/null 2>&1; then
sudo xcode-select --install
else
echo "Xcode CLI tools are already installed"
fi
- name: Install Pyzule
run: bash -c "$(curl https://raw.githubusercontent.com/asdfzxcvbn/pyzule/main/install-pyzule.sh)"
fetch_eeveespotify:
needs: setup
runs-on: macos-latest
steps:
- name: Fetch EeveeSpotify tags
id: eeveespotify
run: |
EEVEEVERSION=${{ github.event.inputs.EEVEEVERSION }}
if [ -z "$EEVEEVERSION" ]; then
REALEEVEEVERSION=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases/latest | jq -r '.tag_name')
else
REALEEVEEVERSION=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases | jq -r --arg VERSION "$EEVEEVERSION" '.[] | select(.tag_name == $VERSION) | .tag_name')
fi
echo "REALEEVEEVERSION=$REALEEVEEVERSION" >> $GITHUB_ENV
download_and_scan:
needs: fetch_eeveespotify
runs-on: macos-latest
steps:
- name: Set up directory
run: mkdir -p "Build Components"
- name: Download Spotify.ipa
id: spotify_download
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: Scan Spotify.ipa
if: always()
run: |
if [ -n "${{ secrets.VIRUSTOTALKEY }}" ]; then
RESPONSE=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' --header "x-apikey: ${{ secrets.VIRUSTOTALKEY }}" --form "file=@Build Components/Spotify.ipa")
VTVANILLASPOTIFY=$(echo $RESPONSE | jq -r '.data.id')
echo "VTVANILLASPOTIFY=$VTVANILLASPOTIFY" >> $GITHUB_ENV
fi
- name: Download and Scan EeveeSpotify
id: eeveespotify_download
run: |
REALEEVEEVERSION=${{ env.REALEEVEEVERSION }}
curl -L "https://github.com/whoeevee/EeveeSpotify/releases/download/$REALEEVEEVERSION/com.eevee.spotify.iphoneos-arm.deb" -o "Build Components/Eevee-arm"
echo "eevee-arm=Build Components/Eevee-arm" >> $GITHUB_ENV
if [ -n "${{ secrets.VIRUSTOTALKEY }}" ]; then
RESPONSE=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' --header "x-apikey: ${{ secrets.VIRUSTOTALKEY }}" --form "file=@Build Components/Eevee-arm")
VTEEVEE=$(echo $RESPONSE | jq -r '.data.id')
echo "VTEEVEE=$VTEEVEE" >> $GITHUB_ENV
fi
env:
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }}
- name: Download and Scan SwiftProtobuf
id: swiftprotobuf_download
run: |
REALEEVEEVERSION=${{ env.REALEEVEEVERSION }}
SWIFTPROTOBUF=$(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')
SWIFTPROTOBUFVERSION=$(echo $SWIFTPROTOBUF | grep -oP '(?<=swiftprotobuf_).*(?=_iphoneos-arm.deb)')
curl -L "$SWIFTPROTOBUF" -o "Build Components/SwiftProtobuf-arm"
echo "swiftprotobuf=Build Components/SwiftProtobuf-arm" >> $GITHUB_ENV
echo "SWIFTPROTOBUFVERSION=$SWIFTPROTOBUFVERSION" >> $GITHUB_ENV
if [ -n "${{ secrets.VIRUSTOTALKEY }}" ]; then
RESPONSE=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' --header "x-apikey: ${{ secrets.VIRUSTOTALKEY }}" --form "file=@Build Components/SwiftProtobuf-arm")
VTSWIFTPROTOBUF=$(echo $RESPONSE | jq -r '.data.id')
echo "VTSWIFTPROTOBUF=$VTSWIFTPROTOBUF" >> $GITHUB_ENV
fi
env:
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }}
- name: Download and Scan Orion
id: orion_download
run: |
ORION=$(curl -s 'https://repo.chariz.com/api/v1/depiction/com.chariz.orion' | jq -r '.links[0].url')
ORIONVERSION=$(echo $ORION | grep -oP '(?<=orion14_).*(?=_iphoneos-arm.deb)')
curl -L "$ORION" -o "Build Components/orion"
echo "orion=Build Components/orion" >> $GITHUB_ENV
echo "ORIONVERSION=$ORIONVERSION" >> $GITHUB_ENV
if [ -n "${{ secrets.VIRUSTOTALKEY }}" ]; then
RESPONSE=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' --header "x-apikey: ${{ secrets.VIRUSTOTALKEY }}" --form "file=@Build Components/orion")
VTORION=$(echo $RESPONSE | jq -r '.data.id')
echo "VTORION=$VTORION" >> $GITHUB_ENV
fi
env:
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }}
- name: Download and Scan Sposify
id: sposify_download
run: |
SPOSIFY=$(curl -s 'https://repo.dynastic.co/api/v1/depiction/com.spos' | jq -r '.links[0].url')
SPOSIFYVERSION=$(echo $SPOSIFY | grep -oP '(?<=spos_).*(?=_iphoneos-arm.deb)')
curl -L "$SPOSIFY" -o "Build Components/sposify"
echo "sposify=Build Components/sposify" >> $GITHUB_ENV
echo "SPOSIFYVERSION=$SPOSIFYVERSION" >> $GITHUB_ENV
if [ -n "${{ secrets.VIRUSTOTALKEY }}" ]; then
RESPONSE=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' --header "x-apikey: ${{ secrets.VIRUSTOTALKEY }}" --form "file=@Build Components/sposify")
VTSPOSIFY=$(echo $RESPONSE | jq -r '.data.id')
echo "VTSPOSIFY=$VTSPOSIFY" >> $GITHUB_ENV
fi
env:
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }}
- name: Download and Scan SposifyFix
id: sposifyfix_download
run: |
SPOSIFYFIX=$(curl -s 'https://level3tjg.me/repo/api/v1/depiction/com.level3tjg.sposifyfix' | jq -r '.links[0].url')
SPOSIFYFIXVERSION=$(echo $SPOSIFYFIX | grep -oP '(?<=sposifyfix_).*(?=_iphoneos-arm.deb)')
curl -L "$SPOSIFYFIX" -o "Build Components/sposifyfix"
echo "sposifyfix=Build Components/sposifyfix" >> $GITHUB_ENV
echo "SPOSIFYFIXVERSION=$SPOSIFYFIXVERSION" >> $GITHUB_ENV
if [ -n "${{ secrets.VIRUSTOTALKEY }}" ]; then
RESPONSE=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' --header "x-apikey: ${{ secrets.VIRUSTOTALKEY }}" --form "file=@Build Components/sposifyfix")
VTSPOSIFYFIX=$(echo $RESPONSE | jq -r '.data.id')
echo "VTSPOSIFYFIX=$VTSPOSIFYFIX" >> $GITHUB_ENV
fi
env:
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }}
build_and_release:
needs: download_and_scan
runs-on: macos-latest
steps:
- name: Clone OpenSpotifySafariExtension
run: |
git clone https://github.com/whoeevee/OpenSpotifySafariExtension
cd OpenSpotifySafariExtension
EXTCOMMIT=$(git rev-parse --short HEAD)
echo "EXTCOMMIT=$EXTCOMMIT" >> $GITHUB_ENV
cp OpenSpotifySafariExtension/OpenSpotifySafariExtension.appex "../Build Components/"
cd ..
- name: Zip OpenSpotifySafariExtension
run: |
cd OpenSpotifySafariExtension
zip -r ../Build\ Components/OpenSpotifySafariExtension.zip .
cd ..
if [ -n "${{ secrets.VIRUSTOTALKEY }}" ]; then
RESPONSE=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' --header "x-apikey: ${{ secrets.VIRUSTOTALKEY }}" --form "file=@Build Components/OpenSpotifySafariExtension.zip")
VTEXT=$(echo $RESPONSE | jq -r '.data.id')
echo "VTEXT=$VTEXT" >> $GITHUB_ENV
fi
- name: Duplicate and Unzip Spotify.ipa
run: |
cp "Build Components/Spotify.ipa" "Build Components/SpotifyAnylises.zip"
unzip "Build Components/SpotifyAnylises.zip" -d "Build Components"
cp "Build Components/payload/Spotify.app/Info.plist" "Build Components/Info.plist"
VANILLASPOTIFYVERSION=$(defaults read "Build Components/Info.plist" CFBundleVersion)
echo "VANILLASPOTIFYVERSION=$VANILLASPOTIFYVERSION" >> $GITHUB_ENV
- name: Modify Spotify.ipa
run: |
cp "Build Components/OpenSpotifySafariExtension.appex" "Build Components/payload/Spotify.app/Plugins/"
cd Build\ Components
zip -r SpotifyEXT.zip payload
mv SpotifyEXT.zip SpotifyEXT.ipa
echo "spotifyEXTpath=Build Components/SpotifyEXT.ipa" >> $GITHUB_ENV
- name: Get CHANGEVERSION
id: 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' | sed 's/^v//')
IFS='.' read -r -a VERSION_PARTS <<< "$LATEST_TAG"
CHANGEVERSION="${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.$((VERSION_PARTS[2]+1))"
fi
echo "CHANGEVERSION=$CHANGEVERSION" >> $GITHUB_ENV
- name: Run Pyzule
run: |
pyzule -i ${{ env.spotifyEXTpath }} -o "Build Components/SpotifyPatched.ipa" -v ${{ env.CHANGEVERSION }} -b com.yodaluca23.SpotCPlusPlus -f ${{ env.sposifyfix }} ${{ env.sposify }} ${{ env.orion }} ${{ env.swiftprotobuf }} ${{ env.eevee-arm }} -u
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: "Build Components/SpotifyPatched.ipa"
tag_name: "v${{ env.CHANGEVERSION }}"
release_name: "SpotC++ v${{ env.CHANGEVERSION }}"
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](${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]()<br>
<br>
</details>"
fi)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}