Build and Release YTMusicUltimate #1
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
# I modified the github action from @arichornlover 's uYouEnhanced repo, but the original idea is by @ISnackable. Thanks to both of them! | |
# https://github.com/ISnackable/YTCubePlus/blob/main/.github/workflows/Build.yml | |
name: Build and Release YTMusicUltimate | |
on: | |
workflow_dispatch: | |
inputs: | |
decrypted_youtube_music_url: | |
description: "The direct URL to the decrypted YouTube Music ipa (Upload a decrypted .ipa file to Dropbox and input its URL here.)" | |
default: "" | |
required: true | |
type: string | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build YTMusicUltimate | |
runs-on: macos-12 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout Main | |
uses: actions/checkout@v4.1.1 | |
with: | |
path: main | |
submodules: recursive | |
- name: Install Dependencies | |
run: brew install ldid dpkg make | |
- name: Set PATH environment variable | |
run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH | |
- name: Setup Theos | |
uses: actions/checkout@v4.1.1 | |
with: | |
repository: theos/theos | |
ref: 4bcc52914e0eeca719288522938185decaa8a1cb | |
path: theos | |
submodules: recursive | |
- name: SDK Caching | |
id: SDK | |
uses: actions/cache@v4.0.1 | |
env: | |
cache-name: iOS-16.2-SDK | |
with: | |
path: theos/sdks/ | |
key: ${{ env.cache-name }} | |
restore-keys: ${{ env.cache-name }} | |
- name: Download iOS SDK | |
if: steps.SDK.outputs.cache-hit != 'true' | |
run: | | |
git clone --quiet -n --depth=1 --filter=tree:0 https://github.com/arichorn/sdks/ | |
cd sdks | |
git sparse-checkout set --no-cone iPhoneOS16.2.sdk | |
git checkout | |
mv *.sdk $THEOS/sdks | |
env: | |
THEOS: ${{ github.workspace }}/theos | |
- name: Setup Theos Jailed | |
uses: actions/checkout@v4.1.1 | |
with: | |
repository: qnblackcat/theos-jailed | |
ref: master | |
path: theos-jailed | |
submodules: recursive | |
- name: Install Theos Jailed | |
run: | | |
./theos-jailed/install | |
env: | |
THEOS: ${{ github.workspace }}/theos | |
- name: Install Azule | |
run: | | |
cd ${{ github.workspace }}/main | |
git clone https://github.com/Al4ise/Azule | |
sudo ln -sf ~/Azule/azule /usr/local/bin/azule | |
- name: Prepare YouTube Music iPA | |
id: prepare_youtube_music | |
run: | | |
wget "$YOUTUBE_MUSIC_URL" --no-verbose -O main/YouTubeMusic.ipa | |
env: | |
YOUTUBE_MUSIC_URL: ${{ inputs.decrypted_youtube_music_url }} | |
- name: Build Tweak for Sideloading | |
id: build_package | |
run: | | |
cd ${{ github.workspace }}/main | |
make clean package SIDELOADING=1 | |
env: | |
THEOS: ${{ github.workspace }}/theos | |
- name: Inject tweak into provided IPA | |
run: | | |
brew install coreutils | |
cd ${{ github.workspace }}/main/packages | |
tweakName=$(ls) | |
cd ${{ github.workspace }}/main | |
./Azule/azule -i $PWD/YouTubeMusic.ipa -o $PWD/packages/YTMusicUltimate.ipa -f $PWD/packages/$tweakName | |
- name: Remove the Watch folder | |
run: | | |
cd ${{ github.workspace }}/main/packages | |
mv YTMusicUltimate.ipa YTMusicUltimate.zip | |
unzip YTMusicUltimate.zip | |
cd Payload/YoutubeMusic.app | |
rm -rf Watch | |
cd ../.. | |
zip -r YTMusicUltimate.ipa Payload | |
rm -rf Payload | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2.0.1 | |
with: | |
tag_name: YTMusicUltimate-v${{ github.run_number }} | |
name: YTMusicUltimate-v${{ github.run_number }} | |
files: main/packages/*.ipa | |
draft: true |