Build and Release #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
name: Setup | |
runs-on: macos-latest | |
steps: | |
- name: Install Xcode and CLI tools | |
uses: actions/setup-xcode@v2 | |
prepare: | |
name: Prepare Environment | |
runs-on: macos-latest | |
needs: setup | |
steps: | |
- name: Install Pyzule | |
run: bash -c "$(curl https://raw.githubusercontent.com/asdfzxcvbn/pyzule/main/install-pyzule.sh)" | |
- name: Fetch EeveeSpotify Release | |
id: fetch-eevee-release | |
run: | | |
latest_tag=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases/latest | jq -r '.tag_name') | |
realeeveeversion=${EEVEEVERSION:-$latest_tag} | |
echo "REALEEVEEVERSION=$realeeveeversion" >> $GITHUB_ENV | |
download-and-analyze: | |
name: Download and Analyze Components | |
runs-on: macos-latest | |
needs: prepare | |
env: | |
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }} | |
steps: | |
- name: Create Build Components folder | |
run: mkdir -p "Build Components" | |
- name: Download Spotify.ipa | |
run: | | |
curl -o "Build Components/Spotify.ipa" $SPOTURL | |
spotifypath="Build Components/Spotify.ipa" | |
echo "spotifypath=$spotifypath" >> $GITHUB_ENV | |
- name: Upload Spotify.ipa to VirusTotal | |
id: virustotal-spotify | |
uses: crazy-max/ghaction-virustotal@v4 | |
with: | |
apikey: ${{ secrets.VIRUSTOTALKEY }} | |
file: ${{ env.spotifypath }} | |
env: | |
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }} | |
- name: Set VTVANILLASPOTIFY variable | |
run: echo "VTVANILLASPOTIFY=${{ steps.virustotal-spotify.outputs.permalink }}" >> $GITHUB_ENV | |
- name: Fetch and Download Eevee-arm.deb | |
run: | | |
eevee_arm_asset=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases/tags/$REALEEVEEVERSION | jq -r '.assets[] | select(.name | startswith("com.eevee.spotify") and .name | endswith("iphoneos-arm.deb")) | .browser_download_url') | |
curl -o "Build Components/Eevee-arm.deb" $eevee_arm_asset | |
eevee_arm="Build Components/Eevee-arm.deb" | |
echo "eevee_arm=$eevee_arm" >> $GITHUB_ENV | |
- name: Upload Eevee-arm.deb to VirusTotal | |
id: virustotal-eevee | |
uses: crazy-max/ghaction-virustotal@v4 | |
with: | |
apikey: ${{ secrets.VIRUSTOTALKEY }} | |
file: ${{ env.eevee_arm }} | |
env: | |
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }} | |
- name: Set VTEEVEE variable | |
run: echo "VTEEVEE=${{ steps.virustotal-eevee.outputs.permalink }}" >> $GITHUB_ENV | |
- name: Fetch and Download SwiftProtobuf-arm.deb | |
run: | | |
swiftprotobuf_asset=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases/tags/$REALEEVEEVERSION | jq -r '.assets[] | select(.name | startswith("org.swift.protobuf.swiftprotobuf") and .name | endswith("iphoneos-arm.deb")) | .browser_download_url') | |
curl -o "Build Components/SwiftProtobuf-arm.deb" $swiftprotobuf_asset | |
swiftprotobuf="Build Components/SwiftProtobuf-arm.deb" | |
SWIFTPROTOBUFVERSION=$(echo $swiftprotobuf_asset | awk -F '_' '{print $2}' | sed 's/.deb//') | |
echo "swiftprotobuf=$swiftprotobuf" >> $GITHUB_ENV | |
echo "SWIFTPROTOBUFVERSION=$SWIFTPROTOBUFVERSION" >> $GITHUB_ENV | |
- name: Upload SwiftProtobuf-arm.deb to VirusTotal | |
id: virustotal-swiftprotobuf | |
uses: crazy-max/ghaction-virustotal@v4 | |
with: | |
apikey: ${{ secrets.VIRUSTOTALKEY }} | |
file: ${{ env.swiftprotobuf }} | |
env: | |
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }} | |
- name: Set VTSWIFTPROTOBUF variable | |
run: echo "VTSWIFTPROTOBUF=${{ steps.virustotal-swiftprotobuf.outputs.permalink }}" >> $GITHUB_ENV | |
- name: Download Orion from Cydia Repo | |
run: | | |
orion_asset=$(curl -s "https://repo.chariz.com/api/latest/com.spos" | jq -r '.deb_url') | |
curl -o "Build Components/orion.deb" $orion_asset | |
orion="Build Components/orion.deb" | |
ORIONVERSION=$(curl -s "https://repo.chariz.com/api/latest/com.spos" | jq -r '.version') | |
echo "orion=$orion" >> $GITHUB_ENV | |
echo "ORIONVERSION=$ORIONVERSION" >> $GITHUB_ENV | |
- name: Upload Orion.deb to VirusTotal | |
id: virustotal-orion | |
uses: crazy-max/ghaction-virustotal@v4 | |
with: | |
apikey: ${{ secrets.VIRUSTOTALKEY }} | |
file: ${{ env.orion }} | |
env: | |
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }} | |
- name: Set VTORION variable | |
run: echo "VTORION=${{ steps.virustotal-orion.outputs.permalink }}" >> $GITHUB_ENV | |
- name: Download Sposify from Cydia Repo | |
run: | | |
sposify_asset=$(curl -s "https://repo.dynastic.co/api/latest/com.spos" | jq -r '.deb_url') | |
curl -o "Build Components/sposify.deb" $sposify_asset | |
sposify="Build Components/sposify.deb" | |
SPOSIFYVERSION=$(curl -s "https://repo.dynastic.co/api/latest/com.spos" | jq -r '.version') | |
echo "sposify=$sposify" >> $GITHUB_ENV | |
echo "SPOSIFYVERSION=$SPOSIFYVERSION" >> $GITHUB_ENV | |
- name: Upload Sposify.deb to VirusTotal | |
id: virustotal-sposify | |
uses: crazy-max/ghaction-virustotal@v4 | |
with: | |
apikey: ${{ secrets.VIRUSTOTALKEY }} | |
file: ${{ env.sposify }} | |
env: | |
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }} | |
- name: Set VTSPOSIFY variable | |
run: echo "VTSPOSIFY=${{ steps.virustotal-sposify.outputs.permalink }}" >> $GITHUB_ENV | |
- name: Download SposifyFix from Cydia Repo | |
run: | | |
sposifyfix_asset=$(curl -s "https://level3tjg.me/repo/api/latest/com.level3tjg.sposifyfix" | jq -r '.deb_url') | |
curl -o "Build Components/sposifyfix.deb" $sposifyfix_asset | |
sposifyfix="Build Components/sposifyfix.deb" | |
SPOSIFYFIXVERSION=$(curl -s "https://level3tjg.me/repo/api/latest/com.level3tjg.sposifyfix" | jq -r '.version') | |
echo "sposifyfix=$sposifyfix" >> $GITHUB_ENV | |
echo "SPOSIFYFIXVERSION=$SPOSIFYFIXVERSION" >> $GITHUB_ENV | |
- name: Upload SposifyFix.deb to VirusTotal | |
id: virustotal-sposifyfix | |
uses: crazy-max/ghaction-virustotal@v4 | |
with: | |
apikey: ${{ secrets.VIRUSTOTALKEY }} | |
file: ${{ env.sposifyfix }} | |
env: | |
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }} | |
- name: Set VTSPOSIFYFIX variable | |
run: echo "VTSPOSIFYFIX=${{ steps.virustotal-sposifyfix.outputs.permalink }}" >> $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/" | |
- name: Get EXTCOMMIT from OpenSpotifySafariExtension | |
run: | | |
cd "OpenSpotifySafariExtension" | |
extcommit=$(git rev-parse --short HEAD) | |
echo "EXTCOMMIT=$extcommit" >> $GITHUB_ENV | |
cd .. | |
- name: Compress OpenSpotifySafariExtension to .zip | |
run: | | |
cd "Build Components" | |
zip -r OpenSpotifySafariExtension.zip OpenSpotifySafariExtension.appex | |
mv OpenSpotifySafariExtension.zip ../OpenSpotifySafariExtension.zip | |
cd .. | |
- name: Upload OpenSpotifySafariExtension.zip to VirusTotal | |
id: virustotal-ext | |
uses: crazy-max/ghaction-virustotal@v4 | |
with: | |
apikey: ${{ secrets.VIRUSTOTALKEY }} | |
file: "OpenSpotifySafariExtension.zip" | |
env: | |
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }} | |
- name: Set VTEXT variable | |
run: echo "VTEXT=${{ steps.virustotal-ext.outputs.permalink }}" >> $GITHUB_ENV | |
- name: Duplicate Spotify.ipa as SpotifyAnalysis.zip | |
run: | | |
cd "Build Components" | |
cp Spotify.ipa SpotifyAnalysis.zip | |
mv SpotifyAnalysis.zip ../SpotifyAnalysis.zip | |
cd .. | |
- name: Unzip SpotifyAnalysis.zip | |
run: unzip "Build Components/SpotifyAnalysis.zip" -d "Build Components/" | |
- name: Copy Info.plist to Build Components | |
run: cp "Build Components/payload/Spotify.app/info.plist" "Build Components/" | |
- name: Get VANILLASPOTIFYVERSION from Info.plist | |
run: | | |
vanillaspotifyversion=$(defaults read "Build Components/info.plist" CFBundleVersion) | |
echo "VANILLASPOTIFYVERSION=$vanillaspotifyversion" >> $GITHUB_ENV | |
- name: Copy OpenSpotifySafariExtension.appex to Payload | |
run: cp "Build Components/OpenSpotifySafariExtension.appex" "Build Components/payload/Spotify.app/PlugIns/" | |
- name: Compress Payload to .ipa | |
run: | | |
cd "Build Components/payload" | |
zip -r SpotifyEXT.zip Spotify.app | |
mv SpotifyEXT.zip ../SpotifyEXT.ipa | |
cd ../.. | |
- name: Set spotifyEXTpath variable | |
run: | | |
spotifyEXTpath="Build Components/SpotifyEXT.ipa" | |
echo "spotifyEXTpath=$spotifyEXTpath" >> $GITHUB_ENV | |
- name: Upload SpotifyEXT.ipa to VirusTotal | |
id: virustotal-spotifyext | |
uses: crazy-max/ghaction-virustotal@v4 | |
with: | |
apikey: ${{ secrets.VIRUSTOTALKEY }} | |
file: "Build Components/SpotifyEXT.ipa" | |
env: | |
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }} | |
versioning: | |
name: Versioning and Patching | |
runs-on: macos-latest | |
needs: download-and-analyze | |
env: | |
SPOTC_REPO: https://github.com/SpotCompiled/SpotC-Plus-Plus | |
steps: | |
- name: Determine CHANGEVERSION | |
run: | | |
if [ -z "$CHANGEVERSION" ]; then | |
latest_tag=$(curl -s $SPOTC_REPO/releases/latest | jq -r '.tag_name') | |
changeversion=$(echo $latest_tag | sed 's/^v//') | |
changeversion=$(echo "$changeversion + 0.0.1" | bc) | |
else | |
changeversion=$CHANGEVERSION | |
fi | |
echo "CHANGEVERSION=$changeversion" >> $GITHUB_ENV | |
release: | |
name: Create Draft Release | |
runs-on: macos-latest | |
needs: [versioning, download-and-analyze] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: "v${{ env.CHANGEVERSION }}" | |
release_name: "SpotC++ v${{ env.CHANGEVERSION }}" | |
draft: true | |
- name: Upload SpotifyPatched.ipa to Release | |
id: upload_asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: "Build Components/SpotifyPatched.ipa" | |
asset_name: "SpotifyPatched.ipa" | |
asset_content_type: application/octet-stream | |
- name: Generate Release Description | |
id: generate_description | |
run: | | |
description="## ChangeLog\n" | |
description+="- Updated [EeveeSpotify](https://github.com/whoeevee/EeveeSpotify) to $REALEEVEEVERSION\n" | |
# Fetching release notes from EeveeSpotify repo | |
eevee_release_notes=$(curl -s https://api.github.com/repos/whoeevee/EeveeSpotify/releases/tags/$REALEEVEEVERSION | jq -r '.body') | |
IFS=$'\n' | |
for line in $eevee_release_notes; do | |
description+="- (EeveeSpotify) $line\n" | |
done | |
description+="\n***\n" | |
description+="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.\n" | |
description+="App .ipa modified and tweaks injected using Pyzule with the GitHub Action Workflow.\n" | |
if [ -n "$VIRUSTOTALKEY" ]; then | |
description+="<details>\n" | |
description+=" <summary>Version Details & VirusTotal Results</summary><br>\n\n" | |
description+=" Spotify Version: v\$VANILLASPOTIFYVERSION\n" | |
description+=" [Vanilla Spotify VirusTotal](\$VTVANILLASPOTIFY)<br>\n" | |
description+=" EeveeSpotify Version: \$REALEEVEEVERSION\n" | |
description+=" [EeveeSpotify .deb VirusTotal](\$VTEEVEE)<br>\n" | |
description+=" Sposify v\$SPOSIFYVERSION\n" | |
description+=" [Sposify VirusTotal](\$VTSPOSIFY)<br>\n" | |
description+=" OpenSpotifySafariExtension Commit: \$EXTCOMMIT\n" | |
description+=" [OpenSpotifySafariExtension Repo Compressed .zip VirusTotal](\$VTEXT)<br>\n" | |
description+=" Sposify Fix v\$SPOSIFYFIXVERSION\n" | |
description+=" [Sposify Fix VirusTotal](\$VTSPOSIFYFIX)<br>\n" | |
description+=" Orion Runtime (iOS 14 - 16) v\$ORIONVERSION\n" | |
description+=" [Orion Runtime (iOS 14 - 16) .deb VirusTotal](\$VTORION)<br>\n" | |
description+=" SwiftProtobuf Framework v\$SWIFTPROTOBUFVERSION\n" | |
description+=" [SwiftProtobuf Framework .deb VirusTotal](\$VTSWIFTPROTOBUF)<br>\n" | |
description+=" SpotC++ Version: v\$CHANGEVERSION\n" | |
description+=" [SpotC++ VirusTotal](\$VTSPOTC)<br>\n\n" | |
description+="</details>\n" | |
fi | |
echo "::set-output name=description::${description}" | |
env: | |
VIRUSTOTALKEY: ${{ secrets.VIRUSTOTALKEY }} | |
- name: Update Release Description | |
id: update_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.CHANGEVERSION }} | |
release_name: "SpotC++ v${{ env.CHANGEVERSION }}" | |
body: ${{ steps.generate_description.outputs.description }} | |
draft: false |