-
Notifications
You must be signed in to change notification settings - Fork 20
258 lines (223 loc) · 12.4 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
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: Install Xcode Command Line Tools
run: xcode-select --install || echo "Xcode Command Line Tools already installed"
- name: Install Pyzule
run: bash -c "$(curl https://raw.githubusercontent.com/asdfzxcvbn/pyzule/main/install-pyzule.sh)"
fetch_tags:
runs-on: macos-latest
needs: setup
steps:
- name: Fetch EeveeSpotify Tags
id: fetch_tags
run: |
TAGS=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/tags | jq -r '.[].name')
if [[ -z "${{ github.event.inputs.EEVEEVERSION }}" ]]; then
echo "latest_tag=$(echo "$TAGS" | head -n 1)" >> $GITHUB_ENV
else
echo "specified_tag=$(echo "$TAGS" | grep "${{ github.event.inputs.EEVEEVERSION }}" | head -n 1)" >> $GITHUB_ENV
fi
download_and_analyze:
runs-on: macos-latest
needs: fetch_tags
steps:
- name: Create Build Components Directory
run: mkdir -p "Build Components"
- name: Download Spotify IPA
id: download_spotify
run: |
curl -L "${{ github.event.inputs.SPOTURL }}" -o "Build Components/Spotify.ipa"
echo "spotifypath=Build Components/Spotify.ipa" >> $GITHUB_ENV
- name: Analyze Spotify IPA
if: ${{ secrets.VIRUSTOTALKEY != '' }}
run: |
VT_URL=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' \
--header 'x-apikey: ${{ secrets.VIRUSTOTALKEY }}' \
--form 'file=@Build Components/Spotify.ipa' | jq -r '.data.id')
ANALYSIS_URL="https://www.virustotal.com/gui/file/$VT_URL/detection"
echo "VTVANILLASPOTIFY=$ANALYSIS_URL" >> $GITHUB_ENV
- name: Download EeveeSpotify
id: download_eevee
run: |
TAG=${{ env.specified_tag || env.latest_tag }}
ASSET_URL=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases/tags/$TAG | jq -r '.assets[] | select(.name | startswith("com.eevee.spotify") and endswith("iphoneos-arm.deb")).browser_download_url')
curl -L "$ASSET_URL" -o "Build Components/Eevee-arm.deb"
echo "eevee-arm=Build Components/Eevee-arm.deb" >> $GITHUB_ENV
echo "REALEEVEEVERSION=$TAG" >> $GITHUB_ENV
- name: Analyze EeveeSpotify
if: ${{ secrets.VIRUSTOTALKEY != '' }}
run: |
VT_URL=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' \
--header 'x-apikey: ${{ secrets.VIRUSTOTALKEY }}' \
--form 'file=@Build Components/Eevee-arm.deb' | jq -r '.data.id')
ANALYSIS_URL="https://www.virustotal.com/gui/file/$VT_URL/detection"
echo "VTEEVEE=$ANALYSIS_URL" >> $GITHUB_ENV
- name: Download SwiftProtobuf
id: download_swiftprotobuf
run: |
TAG=${{ env.specified_tag || env.latest_tag }}
ASSET_URL=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases/tags/$TAG | jq -r '.assets[] | select(.name | startswith("org.swift.protobuf.swiftprotobuf") and endswith("iphoneos-arm.deb")).browser_download_url')
curl -L "$ASSET_URL" -o "Build Components/SwiftProtobuf-arm.deb"
echo "swiftprotobuf=Build Components/SwiftProtobuf-arm.deb" >> $GITHUB_ENV
SWIFTPROTOBUFVERSION=$(basename "$ASSET_URL" | sed -n 's/org.swift.protobuf.swiftprotobuf_\(.*\)_iphoneos-arm.deb/\1/p')
echo "SWIFTPROTOBUFVERSION=$SWIFTPROTOBUFVERSION" >> $GITHUB_ENV
- name: Analyze SwiftProtobuf
if: ${{ secrets.VIRUSTOTALKEY != '' }}
run: |
VT_URL=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' \
--header 'x-apikey: ${{ secrets.VIRUSTOTALKEY }}' \
--form 'file=@Build Components/SwiftProtobuf-arm.deb' | jq -r '.data.id')
ANALYSIS_URL="https://www.virustotal.com/gui/file/$VT_URL/detection"
echo "VTSWIFTPROTOBUF=$ANALYSIS_URL" >> $GITHUB_ENV
- name: Download Orion
id: download_orion
run: |
ORION_URL=$(curl -s https://repo.chariz.com/api/packages/dev.theos.orion14 | jq -r '.latest.deb')
curl -L "$ORION_URL" -o "Build Components/orion.deb"
echo "orion=Build Components/orion.deb" >> $GITHUB_ENV
ORIONVERSION=$(basename "$ORION_URL" | sed -n 's/dev.theos.orion14_\(.*\)_iphoneos-arm.deb/\1/p')
echo "ORIONVERSION=$ORIONVERSION" >> $GITHUB_ENV
- name: Analyze Orion
if: ${{ secrets.VIRUSTOTALKEY != '' }}
run: |
VT_URL=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' \
--header 'x-apikey: ${{ secrets.VIRUSTOTALKEY }}' \
--form 'file=@Build Components/orion.deb' | jq -r '.data.id')
ANALYSIS_URL="https://www.virustotal.com/gui/file/$VT_URL/detection"
echo "VTORION=$ANALYSIS_URL" >> $GITHUB_ENV
- name: Download Sposify
id: download_sposify
run: |
SPOSIFY_URL=$(curl -s https://repo.dynastic.co/api/packages/com.spos | jq -r '.latest.deb')
curl -L "$SPOSIFY_URL" -o "Build Components/sposify.deb"
echo "sposify=Build Components/sposify.deb" >> $GITHUB_ENV
SPOSIFYVERSION=$(basename "$SPOSIFY_URL" | sed -n 's/com.spos_\(.*\)_iphoneos-arm.deb/\1/p')
echo "SPOSIFYVERSION=$SPOSIFYVERSION" >> $GITHUB_ENV
- name: Analyze Sposify
if: ${{ secrets.VIRUSTOTALKEY != '' }}
run: |
VT_URL=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' \
--header 'x-apikey: ${{ secrets.VIRUSTOTALKEY }}' \
--form 'file=@Build Components/sposify.deb' | jq -r '.data.id')
ANALYSIS_URL="https://www.virustotal.com/gui/file/$VT_URL/detection"
echo "VTSPOSIFY=$ANALYSIS_URL" >> $GITHUB_ENV
- name: Download SposifyFix
id: download_sposifyfix
run: |
SPOSIFYFIX_URL=$(curl -s https://level3tjg.me/repo/api/packages/com.level3tjg.sposifyfix | jq -r '.latest.deb')
curl -L "$SPOSIFYFIX_URL" -o "Build Components/sposifyfix.deb"
echo "sposifyfix=Build Components/sposifyfix.deb" >> $GITHUB_ENV
SPOSIFYFIXVERSION=$(basename "$SPOSIFYFIX_URL" | sed -n 's/com.level3tjg.sposifyfix_\(.*\)_iphoneos-arm.deb/\1/p')
echo "SPOSIFYFIXVERSION=$SPOSIFYFIXVERSION" >> $GITHUB_ENV
- name: Analyze SposifyFix
if: ${{ secrets.VIRUSTOTALKEY != '' }}
run: |
VT_URL=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' \
--header 'x-apikey: ${{ secrets.VIRUSTOTALKEY }}' \
--form 'file=@Build Components/sposifyfix.deb' | jq -r '.data.id')
ANALYSIS_URL="https://www.virustotal.com/gui/file/$VT_URL/detection"
echo "VTSPOSIFYFIX=$ANALYSIS_URL" >> $GITHUB_ENV
prepare_extension:
runs-on: macos-latest
needs: download_and_analyze
steps:
- name: Clone OpenSpotifySafariExtension
run: git clone https://github.com/whoeevee/OpenSpotifySafariExtension
- name: Copy and Compress Extension
run: |
cp -r OpenSpotifySafariExtension/OpenSpotifySafariExtension.appex "Build Components/"
cd OpenSpotifySafariExtension
EXT_COMMIT=$(git rev-parse --short HEAD)
echo "EXTCOMMIT=$EXT_COMMIT" >> $GITHUB_ENV
cd ..
zip -r "Build Components/OpenSpotifySafariExtension.zip" OpenSpotifySafariExtension
- name: Analyze Extension Zip
if: ${{ secrets.VIRUSTOTALKEY != '' }}
run: |
VT_URL=$(curl -s --request POST --url 'https://www.virustotal.com/api/v3/files' \
--header 'x-apikey: ${{ secrets.VIRUSTOTALKEY }}' \
--form 'file=@Build Components/OpenSpotifySafariExtension.zip' | jq -r '.data.id')
ANALYSIS_URL="https://www.virustotal.com/gui/file/$VT_URL/detection"
echo "VTEXT=$ANALYSIS_URL" >> $GITHUB_ENV
modify_spotify:
runs-on: macos-latest
needs: prepare_extension
steps:
- name: Duplicate and Unzip Spotify IPA
run: |
cp "${{ env.spotifypath }}" "Build Components/SpotifyAnylises.zip"
unzip -q "Build Components/SpotifyAnylises.zip" -d "Build Components/payload"
- name: Extract Info.plist
run: |
cp "Build Components/payload/Payload/Spotify.app/Info.plist" "Build Components/Info.plist"
VANILLASPOTIFYVERSION=$(defaults read "Build Components/Info.plist" CFBundleVersion)
echo "VANILLASPOTIFYVERSION=$VANILLASPOTIFYVERSION" >> $GITHUB_ENV
- name: Add Extension to Spotify
run: cp -r "Build Components/OpenSpotifySafariExtension.appex" "Build Components/payload/Payload/Spotify.app/PlugIns"
- name: Compress Patched Spotify
run: |
cd "Build Components/payload"
zip -r "../SpotifyEXT.zip" .
cd ..
mv "SpotifyEXT.zip" "SpotifyEXT.ipa"
echo "spotifyEXTpath=Build Components/SpotifyEXT.ipa" >> $GITHUB_ENV
rm -rf "payload"
rm "SpotifyAnylises.zip"
rm "Info.plist"
build_patched_ipa:
runs-on: macos-latest
needs: modify_spotify
steps:
- name: Determine Change Version
run: |
if [ -z "${{ github.event.inputs.CHANGEVERSION }}" ]; then
LATEST_TAG=$(curl -s https://api.github.com/repos/SpotCompiled/SpotC-Plus-Plus/tags | jq -r '.[0].name')
VERSION=${LATEST_TAG//v/}
IFS='.' read -r -a VERSION_PARTS <<< "$VERSION"
VERSION_PARTS[2]=$((VERSION_PARTS[2]+1))
CHANGEVERSION="${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.${VERSION_PARTS[2]}"
else
CHANGEVERSION="${{ github.event.inputs.CHANGEVERSION }}"
fi
echo "CHANGEVERSION=$CHANGEVERSION" >> $GITHUB_ENV
- name: Build Patched IPA
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
create_release:
runs-on: macos-latest
needs: build_patched_ipa
steps:
- name: Create Draft Release
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="v${{ env.CHANGEVERSION }}"
RELEASE_NAME="SpotC++ v${TAG}"
DESCRIPTION="## ChangeLog\n- Updated [EeveeSpotify](https://github.com/whoeevee/EeveeSpotify) to ${{ env.REALEEVEEVERSION }}\n"
RELEASE_NOTES=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases/tags/${{ env.REALEEVEEVERSION }} | jq -r '.body' | sed 's/^/- (EeveeSpotify) /')
DESCRIPTION+="${RELEASE_NOTES}\n"
DESCRIPTION+="- Updated Spotify to version ${{ env.VANILLASPOTIFYVERSION }}\n"
DESCRIPTION+="***\nVanilla 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.\nApp .ipa modified and tweaks injected using Pyzule with the github Action Workflow.\n"
if [ -n "${{ secrets.VIRUSTOTALKEY }}" ]; then
DESCRIPTION+="<details>\n<summary>Version Details & VirusTotal Results</summary><br>\n\nSpotify Version: v${{ env.VANILLASPOTIFYVERSION }}\n[Vanilla Spotify VirusTotal](${{ env.VTVANILLASPOTIFY }})<br>\nEeveeSpotify Version: ${{ env.REALEEVEEVERSION }}\n[EeveeSpotify .deb VirusTotal](${{ env.VTEEVEE }})<br>\nSposify v${{ env.SPOSIFYVERSION }}\n[Sposify VirusTotal](${{ env.VTSPOSIFY }})<br>\nOpenSpotifySafariExtension Commit: ${{ env.EXTCOMMIT }}\n[OpenSpotifySafariExtension Repo Compressed .zip VirusTotal](${{ env.VTEXT }})<br>\nSposify Fix v${{ env.SPOSIFYFIXVERSION }}\n[Sposify Fix VirusTotal](${{ env.VTSPOSIFYFIX }})<br>\nOrion Runtime (iOS 14 - 16) v${{ env.ORIONVERSION }}\n[Orion Runtime (iOS 14 - 16) .deb VirusTotal](${{ env.VTORION }})<br>\nSwiftProtobuf Framework v${{ env.SWIFTPROTOBUFVERSION }}\n[SwiftProtobuf Framework .deb VirusTotal](${{ env.VTSWIFTPROTOBUF }})<br>\nSpotC++ Version: v${{ env.CHANGEVERSION }}\n[SpotC++ VirusTotal]()\n\n<br>\n</details>"
fi
gh release create "$TAG" --draft --title "$RELEASE_NAME" --notes "$DESCRIPTION"
- name: Upload Patched IPA
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload "${{ steps.create_release.outputs.html_url }}" "${{ env.componentspath }}/SpotifyPatched.ipa" --name "SpotC++ v${{ env.CHANGEVERSION }}_v${{ env.VANILLASPOTIFYVERSION }}"