name: Create YouTube Plus app on: workflow_dispatch: inputs: enable_youpip: description: "Integrate YouPiP" type: boolean required: true default: false enable_ytuhd: description: "Integrate YTUHD" type: boolean required: true default: false enable_yq: description: "Integrate YouQuality" type: boolean required: true default: false enable_ryd: description: "Integrate Return YouTube Dislikes" type: boolean required: true default: false enable_demc: description: "Integrate DontEatMyContent" type: boolean required: true default: false ipa_url: description: "URL to the decrypted IPA file" default: "" required: true type: string tweak_version: description: "The version of the tweak to use. Enter the version manually from dayanch96/YTLite/releases or leave default" default: "5.2b4" required: true type: string display_name: description: "App Name (Optional)" default: "YouTube" required: true type: string bundle_id: description: "BundleID (Optional)" default: "com.google.ios.youtube" required: true type: string info_note: description: "TIP: Learn more about integrations in the README via the link below" default: "https://github.com/dayanch96/YTLite#tweak-integration-details" type: string required: false concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: build: name: runs-on: macos-latest permissions: contents: write steps: - name: Checkout Main uses: actions/checkout@v4.1.1 with: path: main submodules: recursive - name: Hide sensitive inputs uses: levibostian/action-hide-sensitive-inputs@v1 with: exclude_inputs: bundle_id,display_name,enable_demc,enable_ryd,enable_youpip,enable_yq,enable_ytuhd,info_note,tweak_version - name: Download and validate IPA run: | wget "${{ inputs.ipa_url }}" --no-verbose -O ${{ github.workspace }}/youtube.ipa file_type=$(file --mime-type -b ${{ github.workspace }}/youtube.ipa) if [[ "$file_type" != "application/x-ios-app" && "$file_type" != "application/zip" ]]; then echo "::error::Validation failed: The downloaded file is not a valid IPA. Detected type: $file_type." exit 1 fi - name: Install Dependencies run: brew install make ldid - name: Set PATH environment variable run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH - name: Cache Theos if: ${{ inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_demc }} id: theos uses: actions/cache@v4 env: cache-name: theos_cache_67db2ab with: path: theos/ key: ${{ env.cache-name }} restore-keys: ${{ env.cache-name }} - name: Setup Theos if: ${{ (inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_demc) && steps.theos.outputs.cache-hit != 'true' }} uses: actions/checkout@v4.1.7 with: repository: theos/theos ref: 67db2ab8d950910161730de77c322658ea3e6b44 path: ${{ github.workspace }}/theos submodules: recursive - name: Download iOS SDK if: ${{ (inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_demc) && steps.theos.outputs.cache-hit != 'true' }} run: | git clone --quiet -n --depth=1 --filter=tree:0 https://github.com/theos/sdks/ cd sdks git sparse-checkout set --no-cone iPhoneOS16.5.sdk git checkout mv *.sdk $THEOS/sdks env: THEOS: ${{ github.workspace }}/theos - name: Install cyan run: pipx install --force https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip - name: Download YouTube Plus id: download_ytp run: | deb_url="https://github.com/dayanch96/YTLite/releases/download/v${{ inputs.tweak_version }}/com.dvntm.ytlite_${{ inputs.tweak_version }}_iphoneos-arm.deb" wget "$deb_url" --no-verbose -O ${{ github.workspace }}/ytplus.deb - name: Clone Open in YouTube (Safari extension) run: | git clone --quiet -n --depth=1 --filter=tree:0 https://github.com/CokePokes/YoutubeExtensions/ cd YoutubeExtensions git sparse-checkout set --no-cone OpenYoutubeSafariExtension.appex git checkout mv *.appex ${{ github.workspace }} - name: Clone YouTubeHeader if: ${{ inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_demc }} run: | if [ -d "$THEOS/include/YouTubeHeader" ]; then echo "YouTubeHeader exists. Pulling latest changes..." cd $THEOS/include/YouTubeHeader git pull else echo "YouTubeHeader does not exist. Cloning repository..." cd $THEOS/include git clone --quiet --depth=1 https://github.com/PoomSmart/YouTubeHeader.git fi if [ "${{ inputs.enable_demc }}" = "true" ]; then echo "Copying YouTubeHeader to YTHeaders..." rm -rf "$THEOS/include/YTHeaders" cp -r "$THEOS/include/YouTubeHeader" "$THEOS/include/YTHeaders" fi env: THEOS: ${{ github.workspace }}/theos - name: Clone PSHeader if: ${{ inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_demc }} run: | if [ -d "$THEOS/include/PSHeader" ]; then echo "PSHeader exists. Pulling latest changes..." cd $THEOS/include/PSHeader git pull else echo "PSHeader does not exist. Cloning repository..." cd $THEOS/include git clone --quiet --depth=1 https://github.com/PoomSmart/PSHeader.git fi env: THEOS: ${{ github.workspace }}/theos - name: Clone YouPiP if: ${{ inputs.enable_youpip }} run: | cd ${{ github.workspace }} git clone --quiet --depth=1 https://github.com/PoomSmart/YouPiP.git - name: Clone YTUHD if: ${{ inputs.enable_ytuhd }} run: | cd ${{ github.workspace }} git clone --quiet --depth=1 https://github.com/Tonwalter888/YTUHD.git - name: Clone Return-YouTube-Dislikes if: ${{ inputs.enable_ryd }} run: | cd ${{ github.workspace }} git clone --quiet --depth=1 https://github.com/PoomSmart/Return-YouTube-Dislikes.git - name: Clone YouGroupSettings if: ${{ inputs.enable_demc }} run: | cd ${{ github.workspace }} git clone --quiet --depth=1 https://github.com/PoomSmart/YouGroupSettings.git - name: Clone YouQuality if: ${{ inputs.enable_yq }} run: | cd ${{ github.workspace }} git clone --quiet --depth=1 https://github.com/PoomSmart/YouQuality.git - name: Clone YTVideoOverlay if: ${{ inputs.enable_yq || inputs.enable_youpip }} run: | cd ${{ github.workspace }} git clone --quiet --depth=1 https://github.com/PoomSmart/YTVideoOverlay.git - name: Clone DontEatMyContent if: ${{ inputs.enable_demc }} run: | cd ${{ github.workspace }} git clone --quiet --depth=1 --recurse-submodules https://github.com/therealFoxster/DontEatMyContent.git - name: Build YouPiP if: ${{ inputs.enable_youpip }} run: | cd ${{ github.workspace }}/YouPiP make clean package DEBUG=0 FINALPACKAGE=1 mv packages/*.deb ${{ github.workspace }}/youpip.deb env: THEOS: ${{ github.workspace }}/theos - name: Build YTUHD if: ${{ inputs.enable_ytuhd }} run: | cd ${{ github.workspace }}/YTUHD make clean package DEBUG=0 FINALPACKAGE=1 mv packages/*.deb ${{ github.workspace }}/ytuhd.deb env: THEOS: ${{ github.workspace }}/theos - name: Build Return-YouTube-Dislikes if: ${{ inputs.enable_ryd }} run: | cd ${{ github.workspace }}/Return-YouTube-Dislikes make clean package DEBUG=0 FINALPACKAGE=1 mv packages/*.deb ${{ github.workspace }}/ryd.deb env: THEOS: ${{ github.workspace }}/theos - name: Build YouGroupSettings if: ${{ inputs.enable_demc }} run: | cd ${{ github.workspace }}/YouGroupSettings make clean package DEBUG=0 FINALPACKAGE=1 mv packages/*.deb ${{ github.workspace }}/ygs.deb env: THEOS: ${{ github.workspace }}/theos - name: Build YouQuality if: ${{ inputs.enable_yq }} run: | cd ${{ github.workspace }}/YouQuality make clean package DEBUG=0 FINALPACKAGE=1 mv packages/*.deb ${{ github.workspace }}/yq.deb env: THEOS: ${{ github.workspace }}/theos - name: Build YTVideoOverlay if: ${{ inputs.enable_yq || inputs.enable_youpip }} run: | cd ${{ github.workspace }}/YTVideoOverlay make clean package DEBUG=0 FINALPACKAGE=1 mv packages/*.deb ${{ github.workspace }}/ytvo.deb env: THEOS: ${{ github.workspace }}/theos - name: Build DontEatMyContent if: ${{ inputs.enable_demc }} run: | cd ${{ github.workspace }}/DontEatMyContent make clean package DEBUG=0 FINALPACKAGE=1 mv packages/*.deb ${{ github.workspace }}/demc.deb env: THEOS: ${{ github.workspace }}/theos - name: Inject tweaks into IPA run: | tweaks="ytplus.deb OpenYoutubeSafariExtension.appex" for f in *.deb; do if [ -f "$f" ]; then tweaks="$tweaks $f" fi done cyan -i youtube.ipa -o YouTubePlus_${{ inputs.tweak_version }}.ipa -uwef $tweaks -n "${{ inputs.display_name }}" -b ${{ inputs.bundle_id }} - name: Upload to GitHub Releases uses: softprops/action-gh-release@v2.0.1 with: tag_name: ytp-${{ github.run_number }} name: YouTubePlus v${{ inputs.tweak_version }} (${{ github.run_number }}) files: YouTubePlus_${{ inputs.tweak_version }}.ipa draft: true - name: Output Release URL run: | echo "::notice::Release available at: https://github.com/${{ github.repository }}/releases"