From ba09717493fa3dcfc4976e59122d5b9c3f705746 Mon Sep 17 00:00:00 2001 From: Luca LeBlanc <67206487+yodaluca23@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:52:36 -0500 Subject: [PATCH] Update Build and Release.yml --- .github/workflows/Build and Release.yml | 104 ++++++++++++++++++++++-- 1 file changed, 99 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Build and Release.yml b/.github/workflows/Build and Release.yml index 4ff9d4e..7a47553 100644 --- a/.github/workflows/Build and Release.yml +++ b/.github/workflows/Build and Release.yml @@ -307,7 +307,7 @@ jobs: - name: Run Pyzule run: | - pyzule -i "${{ env.spotifypath }}" -o "${{ env.componentspath }}/SpotveeC.v${{ env.CHANGEVERSION }}_v${{ env.VANILLASPOTIFYVERSION }}.ipa" -v ${{ env.CHANGEVERSION }} -b com.yodaluca23.SpotveeC -f "${{ env.orion }}" "${{ env.swiftprotobuf }}" "${{ env.eevee-arm64 }}" -u -w -Nfix + pyzule -i "${{ env.spotifypath }}" -o "${{ env.componentspath }}/SpotveeC.v${{ env.CHANGEVERSION }}_v${{ env.VANILLASPOTIFYVERSION }}.ipa" -v ${{ env.CHANGEVERSION }} -f "${{ env.orion }}" "${{ env.swiftprotobuf }}" "${{ env.eevee-arm64 }}" -u -w -Nfix echo "patchedspotify=${{ env.componentspath }}/SpotveeC.v${{ env.CHANGEVERSION }}_v${{ env.VANILLASPOTIFYVERSION }}.ipa" echo "patchedspotify=${{ env.componentspath }}/SpotveeC.v${{ env.CHANGEVERSION }}_v${{ env.VANILLASPOTIFYVERSION }}.ipa" >> $GITHUB_ENV echo "Patched Spotify .ipa Located: $patchedspotify" @@ -324,11 +324,33 @@ jobs: if: ${{ env.VIRUSTOTALKEY }} run: echo "VTSPOTV=${{ steps.vt-spotv.outputs.analysis }}" >> $GITHUB_ENV + - name: Run AltStore Pyzule + run: | + pyzule -i "${{ env.spotifypath }}" -o "${{ env.componentspath }}/SpotveeC.v${{ env.CHANGEVERSION }}_v${{ env.VANILLASPOTIFYVERSION }}_ALTSTORESOURCE_ONLY.ipa" -v ${{ env.CHANGEVERSION }} -b com.yodaluca23.SpotveeC -f "${{ env.orion }}" "${{ env.swiftprotobuf }}" "${{ env.eevee-arm64 }}" -u -w -Nfix + echo "altpatchedspotify=${{ env.componentspath }}/SpotveeC.v${{ env.CHANGEVERSION }}_v${{ env.VANILLASPOTIFYVERSION }}_ALTSTORESOURCE_ONLY.ipa" + echo "altpatchedspotify=${{ env.componentspath }}/SpotveeC.v${{ env.CHANGEVERSION }}_v${{ env.VANILLASPOTIFYVERSION }}_ALTSTORESOURCE_ONLY.ipa" >> $GITHUB_ENV + echo "AltStore Patched Spotify .ipa Located: $altpatchedspotify" + + - name: Upload AltSpotifyPatched.ipa to VirusTotal + if: ${{ env.VIRUSTOTALKEY }} + uses: crazy-max/ghaction-virustotal@v4 + id: vt-altspotv + with: + files: "${{ env.altpatchedspotify }}" + vt_api_key: ${{ env.VIRUSTOTALKEY }} + + - name: Set VirusTotal Analysis URL for AltSpotVeeC + if: ${{ env.VIRUSTOTALKEY }} + run: echo "VTALTSPOTV=${{ steps.vt-altspotv.outputs.analysis }}" >> $GITHUB_ENV + - name: Extract and Prepare VirusTotal Links run: | VTSPOTV=$(echo "$VTSPOTV" | sed 's/.*\(https:\/\/.*\)/\1/') echo "SpotveeC VT: $VTSPOTV" echo "VTSPOTV=$VTSPOTV" >> $GITHUB_ENV + VTALTSPOTV=$(echo "$VTALTSPOTV" | sed 's/.*\(https:\/\/.*\)/\1/') + echo "AltStore SpotveeC VT: $VTALTSPOTV" + echo "VTALTSPOTV=$VTALTSPOTV" >> $GITHUB_ENV VTVANILLASPOTIFY=$(echo "$VTVANILLASPOTIFY" | sed 's/.*\(https:\/\/.*\)/\1/') echo "Vanilla Spotify VT: $VTVANILLASPOTIFY" echo "VTVANILLASPOTIFY=$VTVANILLASPOTIFY" >> $GITHUB_ENV @@ -384,6 +406,7 @@ jobs: - name: Construct ChangeLog Pt.6 (Add App Details and Workflow Link) run: | echo "App .ipa modified and tweaks injected using [my fork](https://github.com/yodaluca23/pyzule) of [Pyzule](https://github.com/asdfzxcvbn/pyzule) with [the github Action Workflow.](${{ env.WORKFLOWURL }})
" >> changelog.txt + echo "***If you are downloading from this page, and are reading this, DO NOT USE the .ipa labeled _ALTSTORESOURCE_ONLY***" >> changelog.txt - name: Construct ChangeLog Pt.7 (Add Version Details & VirusTotal Results) if: ${{ env.VIRUSTOTALKEY != '' }} @@ -410,7 +433,9 @@ jobs: name: "SpotveeC v${{ env.CHANGEVERSION }}" draft: true body_path: changelog.txt - files: "${{ env.patchedspotify }}" + files: | + ${{ env.patchedspotify }} + ${{ env.altpatchedspotify }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -423,6 +448,12 @@ jobs: echo "SpotveeC File Size: $FILE_SIZE" echo "SPOTVSIZE=$FILE_SIZE" >> $GITHUB_ENV + - name: Calculate AltStore SpotveeC Filesize + run: | + FILE_SIZE=$(stat -f%z "${{ env.altpatchedspotify }}") + echo "AltStore SpotveeC File Size: $FILE_SIZE" + echo "ALTSPOTVSIZE=$FILE_SIZE" >> $GITHUB_ENV + - name: Fetch the first bullet point from the EeveeSpotify release changelog id: fetch-changelog run: | @@ -438,7 +469,7 @@ jobs: run: | jq --arg CHANGEVERSION "${{ env.CHANGEVERSION }}" \ --arg CURRENTDATE "$(date +%Y-%-m-%d)" \ - --arg SIZE "${{ env.SPOTVSIZE }}" \ + --arg SIZE "${{ env.ALTSPOTVSIZE }}" \ --arg ALTSTORECHANGELOG "${{ env.ALTSTORECHANGELOG }}" \ --arg VANILLASPOTIFYVERSION "${{ env.VANILLASPOTIFYVERSION }}" \ --arg EEVEEVERSIONNAME "${{ env.EEVEEVERSIONNAME }}" \ @@ -450,12 +481,12 @@ jobs: (.apps[] | select(.name == "SpotveeC") | .size) = ($SIZE | tonumber) | (.apps[] | select(.name == "SpotveeC") | .changelog) = $ALTSTORECHANGELOG | (.apps[] | select(.name == "SpotveeC") | .versionDescription) = $ALTSTORECHANGELOG | - (.apps[] | select(.name == "SpotveeC") | .downloadURL) = "https://github.com/SpotCompiled/SpotveeC/releases/download/v\($CHANGEVERSION)/SpotveeC.v\($CHANGEVERSION)_v\($VANILLASPOTIFYVERSION).ipa" | + (.apps[] | select(.name == "SpotveeC") | .downloadURL) = "https://github.com/SpotCompiled/SpotveeC/releases/download/v\($CHANGEVERSION)/SpotveeC.v\($CHANGEVERSION)_v\($VANILLASPOTIFYVERSION)_ALTSTORESOURCE_ONLY.ipa" | (.apps[] | select(.name == "SpotveeC") | .versions) |= [{ "version": $CHANGEVERSION, "date": $CURRENTDATE, "localizedDescription": $ALTSTORECHANGELOG, - "downloadURL": "https://github.com/SpotCompiled/SpotveeC/releases/download/v\($CHANGEVERSION)/SpotveeC.v\($CHANGEVERSION)_v\($VANILLASPOTIFYVERSION).ipa", + "downloadURL": "https://github.com/SpotCompiled/SpotveeC/releases/download/v\($CHANGEVERSION)/SpotveeC.v\($CHANGEVERSION)_v\($VANILLASPOTIFYVERSION)_ALTSTORESOURCE_ONLY.ipa", "size": ($SIZE | tonumber), "minOSVersion": "15.0" }] + . | @@ -493,3 +524,66 @@ jobs: with: name: UpdatedAltStoreRepo path: AltStoreRepo.json + + - name: Download Scarlet Repo.json + run: curl "https://raw.githubusercontent.com/SpotCompiled/SpotC-Repo/main/Scarlet%20Repo.json" -o ./ScarletRepo.json + + - name: Update Scarlet Repo.json + run: | + jq --arg CHANGEVERSION "${{ env.CHANGEVERSION }}" \ + --arg CURRENTDATE "$(date +%Y-%-m-%d)" \ + --arg SIZE "${{ env.SPOTVSIZE }}" \ + --arg ALTSTORECHANGELOG "${{ env.ALTSTORECHANGELOG }}" \ + --arg VANILLASPOTIFYVERSION "${{ env.VANILLASPOTIFYVERSION }}" \ + --arg EEVEEVERSIONNAME "${{ env.EEVEEVERSIONNAME }}" \ + --arg ORIONVERSION "${{ env.ORIONVERSION }}" \ + --arg SWIFTPROTOBUFVERSION "${{ env.SWIFTPROTOBUFVERSION }}" \ + ' + (.apps[] | select(.name == "SpotveeC") | .version) = $CHANGEVERSION | + (.apps[] | select(.name == "SpotveeC") | .versionDate) = $CURRENTDATE | + (.apps[] | select(.name == "SpotveeC") | .size) = ($SIZE | tonumber) | + (.apps[] | select(.name == "SpotveeC") | .changelog) = $ALTSTORECHANGELOG | + (.apps[] | select(.name == "SpotveeC") | .versionDescription) = $ALTSTORECHANGELOG | + (.apps[] | select(.name == "SpotveeC") | .downloadURL) = "https://github.com/SpotCompiled/SpotveeC/releases/download/v\($CHANGEVERSION)/SpotveeC.v\($CHANGEVERSION)_v\($VANILLASPOTIFYVERSION).ipa" | + (.apps[] | select(.name == "SpotveeC") | .versions) |= [{ + "version": $CHANGEVERSION, + "date": $CURRENTDATE, + "localizedDescription": $ALTSTORECHANGELOG, + "downloadURL": "https://github.com/SpotCompiled/SpotveeC/releases/download/v\($CHANGEVERSION)/SpotveeC.v\($CHANGEVERSION)_v\($VANILLASPOTIFYVERSION).ipa", + "size": ($SIZE | tonumber), + "minOSVersion": "15.0" + }] + . | + (.apps[] | select(.name == "SpotveeC") | .information) = [ + { + "item": "Spotify", + "version": "v\($VANILLASPOTIFYVERSION)", + "authors": "Spotify AB", + "url": "https://www.spotify.com" + }, + { + "item": "EeveeSpotify", + "version": $EEVEEVERSIONNAME, + "authors": "Whoeevee & Asdfzxcvbn", + "url": "https://github.com/${{ env.EEVEEREPO }}" + }, + { + "item": "Orion Runtime", + "version": "v\($ORIONVERSION)", + "authors": "Theos Team", + "url": "https://orion.theos.dev" + }, + { + "item": "SwiftProtobuf Framework", + "version": "v\($SWIFTPROTOBUFVERSION)", + "authors": "Apple Inc.", + "url": "https://github.com/apple/swift-protobuf" + } + ] + ' ScarletRepo.json > ScarletRepo_updated.json + mv ScarletRepo_updated.json ScarletRepo.json + + - name: Upload updated Scarlet Repo.json as artifact + uses: actions/upload-artifact@v2 + with: + name: UpdatedScarletRepo + path: ScarletRepo.json