Skip to content

Commit

Permalink
Update Build and Release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yodaluca23 authored Jul 22, 2024
1 parent 88239ea commit ba09717
Showing 1 changed file with 99 additions and 5 deletions.
104 changes: 99 additions & 5 deletions .github/workflows/Build and Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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 }}) </br>" >> 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 != '' }}
Expand All @@ -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 }}

Expand All @@ -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: |
Expand All @@ -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 }}" \
Expand All @@ -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"
}] + . |
Expand Down Expand Up @@ -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

0 comments on commit ba09717

Please sign in to comment.