reusable workflow, ytab, extension

This commit is contained in:
Dan
2026-03-15 10:59:51 +03:00
parent 752ccb32af
commit eedc78fc25
4 changed files with 324 additions and 651 deletions
+223
View File
@@ -0,0 +1,223 @@
name: Build Tweaks (Helper)
on:
workflow_call:
inputs:
enable_youpip:
type: boolean
required: true
default: false
enable_ytuhd:
type: boolean
required: true
default: false
enable_yq:
type: boolean
required: true
default: false
enable_ryd:
type: boolean
required: true
default: false
enable_ytabc:
type: boolean
required: true
default: false
enable_demc:
type: boolean
required: true
default: false
tweak_version:
type: string
required: false
default: ""
tweak_url:
type: string
required: false
default: ""
jobs:
build-tweaks:
name: Build Tweaks
runs-on: macos-latest
steps:
- name: Install Dependencies
run: brew install make ldid dpkg
- name: Set PATH environment variable
run: |
echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
echo "THEOS=${{ github.workspace }}/theos" >> $GITHUB_ENV
- name: Cache Theos
if: ${{ inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_ytabc || inputs.enable_demc }}
id: theos
uses: actions/cache@v5
env:
cache-name: theos_cache_13c2237
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_ytabc || inputs.enable_demc) && steps.theos.outputs.cache-hit != 'true' }}
uses: actions/checkout@v6
with:
repository: theos/theos
ref: 13c22376b5d83ff759c1993de0a861e673aa522b
path: theos
submodules: recursive
- name: Download iOS SDK
if: ${{ (inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_ytabc || 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
- name: Download YouTube Plus (by version)
if: ${{ inputs.tweak_version != '' }}
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 ytplus.deb
- name: Download YouTube Plus (by URL)
if: ${{ inputs.tweak_url != '' }}
run: |
wget "${{ inputs.tweak_url }}" --no-verbose -O ytplus.deb
file_type=$(file --mime-type -b ytplus.deb)
if [[ "$file_type" != "application/vnd.debian.binary-package" ]]; then
echo "::error::Validation failed: The file is not a valid DEB file. Detected type: $file_type."
exit 1
fi
- name: Clone YouTubeHeader
if: ${{ inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_ytabc || inputs.enable_demc }}
run: |
if [ -d "$THEOS/include/YouTubeHeader" ]; then
cd $THEOS/include/YouTubeHeader && git pull
else
cd $THEOS/include && git clone --quiet --depth=1 https://github.com/PoomSmart/YouTubeHeader.git
fi
if [ "${{ inputs.enable_demc }}" = "true" ]; then
rm -rf "$THEOS/include/YTHeaders"
cp -r "$THEOS/include/YouTubeHeader" "$THEOS/include/YTHeaders"
fi
- name: Clone PSHeader
if: ${{ inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_ytabc || inputs.enable_demc }}
run: |
if [ -d "$THEOS/include/PSHeader" ]; then
cd $THEOS/include/PSHeader && git pull
else
cd $THEOS/include && git clone --quiet --depth=1 https://github.com/PoomSmart/PSHeader.git
fi
- name: Clone YouPiP
if: ${{ inputs.enable_youpip }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouPiP.git
- name: Clone YTUHD
if: ${{ inputs.enable_ytuhd }}
run: git clone --quiet --depth=1 https://github.com/Tonwalter888/YTUHD.git
- name: Clone Return-YouTube-Dislikes
if: ${{ inputs.enable_ryd }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/Return-YouTube-Dislikes.git
- name: Clone YTABConfig
if: ${{ inputs.enable_ytabc }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YTABConfig.git
- name: Clone YouGroupSettings
if: ${{ inputs.enable_demc }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouGroupSettings.git
- name: Clone YouQuality
if: ${{ inputs.enable_yq }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YouQuality.git
- name: Clone YTVideoOverlay
if: ${{ inputs.enable_yq || inputs.enable_youpip }}
run: git clone --quiet --depth=1 https://github.com/PoomSmart/YTVideoOverlay.git
- name: Clone DontEatMyContent
if: ${{ inputs.enable_demc }}
run: git clone --quiet --depth=1 https://github.com/therealFoxster/DontEatMyContent.git
- name: Build YouPiP
if: ${{ inputs.enable_youpip }}
run: |
cd YouPiP && make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ../youpip.deb
- name: Build YTUHD
if: ${{ inputs.enable_ytuhd }}
run: |
cd YTUHD && make clean package DEBUG=0 FINALPACKAGE=1 ARCHS=arm64
mv packages/*.deb ../ytuhd.deb
- name: Build Return-YouTube-Dislikes
if: ${{ inputs.enable_ryd }}
run: |
cd Return-YouTube-Dislikes && make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ../ryd.deb
- name: Build YTABConfig
if: ${{ inputs.enable_ytabc }}
run: |
cd YTABConfig && make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ../ytabc.deb
- name: Build YouGroupSettings
if: ${{ inputs.enable_youpip || inputs.enable_ytuhd || inputs.enable_yq || inputs.enable_ryd || inputs.enable_demc }}
run: |
cd YouGroupSettings && make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ../ygs.deb
- name: Build YouQuality
if: ${{ inputs.enable_yq }}
run: |
cd YouQuality && make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ../yq.deb
- name: Build YTVideoOverlay
if: ${{ inputs.enable_yq || inputs.enable_youpip }}
run: |
cd YTVideoOverlay && make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ../ytvo.deb
- name: Build DontEatMyContent
if: ${{ inputs.enable_demc }}
run: |
cd DontEatMyContent && make clean package DEBUG=0 FINALPACKAGE=1
mv packages/*.deb ../demc.deb
- name: Clone Open in YouTube (Safari extension)
run: |
git clone --quiet -n --depth=1 --filter=tree:0 https://github.com/BillyCurtis/OpenYouTubeSafariExtension
cd OpenYoutubeSafariExtension
git sparse-checkout set --no-cone OpenYoutubeSafariExtension.appex
git checkout
mv *.appex ..
- name: Upload built debs as artifacts
uses: actions/upload-artifact@v6
with:
name: built-debs
path: |
*.deb
*.appex
if-no-files-found: ignore
retention-days: 1
+37 -222
View File
@@ -1,9 +1,8 @@
name: Generate TrollFools/Cyan files name: Generate TrollFools/Cyan files
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
create_cyan: create_cyan:
description: "Generate .cyan file" description: "Generate .cyan file"
type: boolean type: boolean
@@ -40,6 +39,12 @@ on:
required: true required: true
default: false default: false
enable_ytabc:
description: "Integrate YTABConfig"
type: boolean
required: true
default: false
enable_demc: enable_demc:
description: "Integrate DontEatMyContent" description: "Integrate DontEatMyContent"
type: boolean type: boolean
@@ -69,18 +74,30 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
build: build-tweaks:
name: uses: ./.github/workflows/_build_tweaks.yml
with:
enable_youpip: ${{ inputs.enable_youpip }}
enable_ytuhd: ${{ inputs.enable_ytuhd }}
enable_yq: ${{ inputs.enable_yq }}
enable_ryd: ${{ inputs.enable_ryd }}
enable_ytabc: ${{ inputs.enable_ytabc }}
enable_demc: ${{ inputs.enable_demc }}
tweak_version: ${{ inputs.tweak_version }}
package:
name: Generate Cyan/TrollFools
runs-on: macos-latest runs-on: macos-latest
needs: build-tweaks
permissions: permissions:
contents: write contents: write
steps: steps:
- name: Checkout Main - name: Download built debs
uses: actions/checkout@v6.0.2 uses: actions/download-artifact@v7
with: with:
path: main name: built-debs
submodules: recursive path: ${{ github.workspace }}
- name: Check Inputs - name: Check Inputs
if: ${{ !inputs.create_cyan && !inputs.create_tf }} if: ${{ !inputs.create_cyan && !inputs.create_tf }}
@@ -89,223 +106,27 @@ jobs:
exit 0 exit 0
- name: Install Dependencies - name: Install Dependencies
run: brew install make ldid dpkg run: brew install dpkg
- 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@v5.0.3
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@v6.0.2
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 - name: Install cyan
if: ${{ inputs.create_cyan }} if: ${{ github.event.inputs.create_cyan }}
run: pipx install --force https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip 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)
if: ${{ inputs.create_cyan }}
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: Generate .cyan file - name: Generate .cyan file
if: ${{ inputs.create_cyan }} if: ${{ github.event.inputs.create_cyan }}
run: | run: |
tweaks="ytplus.deb OpenYoutubeSafariExtension.appex" tweaks="ytplus.deb OpenYoutubeSafariExtension.appex"
for f in *.deb; do
for deb in youpip.deb ytuhd.deb ryd.deb ygs.deb yq.deb ytvo.deb demc.deb; do [ -f "$f" ] && tweaks="$tweaks $f"
if [ -f "$deb" ]; then
tweaks="$tweaks $deb"
fi
done done
cgen -uwef $tweaks -n "${{ github.event.inputs.display_name }}" -b ${{ github.event.inputs.bundle_id }} -o cyan_YouTubePlus_${{ github.event.inputs.tweak_version }}.cyan
cgen -uwef $tweaks -n "${{ inputs.display_name }}" -b ${{ inputs.bundle_id }} -o cyan_YouTubePlus_${{ inputs.tweak_version }}.cyan
- name: Generate .zip file for TrollFools - name: Generate .zip file for TrollFools
if: ${{ inputs.create_tf }} if: ${{ github.event.inputs.create_tf }}
run: | run: |
mkdir -p ytp_tf mkdir -p ytp_tf
for f in *.deb; do for f in *.deb; do
if [ -f "$f" ]; then if [ -f "$f" ]; then
echo "Extracting $f..."
mkdir -p tmp_deb mkdir -p tmp_deb
dpkg-deb -x "$f" tmp_deb dpkg-deb -x "$f" tmp_deb
find tmp_deb -type f -name "*.dylib" -exec cp -R {} ytp_tf/ \; find tmp_deb -type f -name "*.dylib" -exec cp -R {} ytp_tf/ \;
@@ -313,10 +134,8 @@ jobs:
rm -rf tmp_deb rm -rf tmp_deb
fi fi
done done
echo "Zipping..."
cd ytp_tf cd ytp_tf
zip -r "../TrollFools_YouTubePlus_${{ inputs.tweak_version }}.zip" . zip -r "../TrollFools_YouTubePlus_${{ github.event.inputs.tweak_version }}.zip" .
cd .. cd ..
rm -rf ytp_tf rm -rf ytp_tf
@@ -324,12 +143,8 @@ jobs:
id: filelist id: filelist
run: | run: |
files="" files=""
if [ "${{ inputs.create_cyan }}" = "true" ]; then [ "${{ github.event.inputs.create_cyan }}" = "true" ] && files="${files}cyan_YouTubePlus_${{ github.event.inputs.tweak_version }}.cyan"$'\n'
files="${files}cyan_YouTubePlus_${{ inputs.tweak_version }}.cyan"$'\n' [ "${{ github.event.inputs.create_tf }}" = "true" ] && files="${files}TrollFools_YouTubePlus_${{ github.event.inputs.tweak_version }}.zip"$'\n'
fi
if [ "${{ inputs.create_tf }}" = "true" ]; then
files="${files}TrollFools_YouTubePlus_${{ inputs.tweak_version }}.zip"$'\n'
fi
echo -e "files<<EOF" >> $GITHUB_OUTPUT echo -e "files<<EOF" >> $GITHUB_OUTPUT
echo -e "$files" >> $GITHUB_OUTPUT echo -e "$files" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT
@@ -338,10 +153,10 @@ jobs:
uses: softprops/action-gh-release@v2.5.0 uses: softprops/action-gh-release@v2.5.0
with: with:
tag_name: ytp-${{ github.run_number }} tag_name: ytp-${{ github.run_number }}
name: YouTubePlus v${{ inputs.tweak_version }}_cyan_trollfools (${{ github.run_number }}) name: YouTubePlus v${{ github.event.inputs.tweak_version }}_cyan_trollfools (${{ github.run_number }})
files: ${{ steps.filelist.outputs.files }} files: ${{ steps.filelist.outputs.files }}
draft: true draft: true
- name: Output Release URL - name: Output Release URL
run: | run: |
echo "::notice::Release available at: https://github.com/${{ github.repository }}/releases" echo "::notice::Release available at: https://github.com/${{ github.repository }}/releases"
+33 -213
View File
@@ -1,9 +1,8 @@
name: Create YouTube Plus app name: Create YouTube Plus app
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
enable_youpip: enable_youpip:
description: "Integrate YouPiP" description: "Integrate YouPiP"
type: boolean type: boolean
@@ -28,6 +27,12 @@ on:
required: true required: true
default: false default: false
enable_ytabc:
description: "Integrate YTABConfig"
type: boolean
required: true
default: false
enable_demc: enable_demc:
description: "Integrate DontEatMyContent" description: "Integrate DontEatMyContent"
type: boolean type: boolean
@@ -69,248 +74,63 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
build: build-tweaks:
name: uses: ./.github/workflows/_build_tweaks.yml
with:
enable_youpip: ${{ inputs.enable_youpip }}
enable_ytuhd: ${{ inputs.enable_ytuhd }}
enable_yq: ${{ inputs.enable_yq }}
enable_ryd: ${{ inputs.enable_ryd }}
enable_ytabc: ${{ inputs.enable_ytabc }}
enable_demc: ${{ inputs.enable_demc }}
tweak_version: ${{ inputs.tweak_version }}
package:
name: Package IPA
runs-on: macos-latest runs-on: macos-latest
needs: build-tweaks
permissions: permissions:
contents: write contents: write
steps: steps:
- name: Checkout Main - name: Download built debs
uses: actions/checkout@v6.0.2 uses: actions/download-artifact@v7
with: with:
path: main name: built-debs
submodules: recursive path: ${{ github.workspace }}
- name: Hide sensitive inputs - name: Hide sensitive inputs
uses: levibostian/action-hide-sensitive-inputs@v1.1.1 uses: levibostian/action-hide-sensitive-inputs@v1
with: with:
exclude_inputs: bundle_id,display_name,enable_demc,enable_ryd,enable_youpip,enable_yq,enable_ytuhd,info_note,tweak_version exclude_inputs: bundle_id,display_name,enable_demc,enable_ryd,enable_ytabc,enable_youpip,enable_yq,enable_ytuhd,info_note,tweak_version
- name: Download and validate IPA - name: Download and validate IPA
run: | run: |
wget "${{ inputs.ipa_url }}" --no-verbose -O ${{ github.workspace }}/youtube.ipa wget "${{ github.event.inputs.ipa_url }}" --no-verbose -O youtube.ipa
file_type=$(file --mime-type -b youtube.ipa)
file_type=$(file --mime-type -b ${{ github.workspace }}/youtube.ipa)
if [[ "$file_type" != "application/x-ios-app" && "$file_type" != "application/zip" ]]; then 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." echo "::error::Validation failed: The downloaded file is not a valid IPA. Detected type: $file_type."
exit 1 exit 1
fi 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@v5.0.3
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@v6.0.2
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 - name: Install cyan
run: pipx install --force https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip 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 - name: Inject tweaks into IPA
run: | run: |
tweaks="ytplus.deb OpenYoutubeSafariExtension.appex" tweaks="ytplus.deb OpenYoutubeSafariExtension.appex"
for f in *.deb; do for f in *.deb; do
if [ -f "$f" ]; then [ -f "$f" ] && tweaks="$tweaks $f"
tweaks="$tweaks $f"
fi
done done
cyan -i youtube.ipa -o YouTubePlus_${{ github.event.inputs.tweak_version }}.ipa -uwef $tweaks -n "${{ github.event.inputs.display_name }}" -b ${{ github.event.inputs.bundle_id }}
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 - name: Upload to GitHub Releases
uses: softprops/action-gh-release@v2.5.0 uses: softprops/action-gh-release@v2.5.0
with: with:
tag_name: ytp-${{ github.run_number }} tag_name: ytp-${{ github.run_number }}
name: YouTubePlus v${{ inputs.tweak_version }} (${{ github.run_number }}) name: YouTubePlus v${{ github.event.inputs.tweak_version }} (${{ github.run_number }})
files: YouTubePlus_${{ inputs.tweak_version }}.ipa files: YouTubePlus_${{ github.event.inputs.tweak_version }}.ipa
draft: true draft: true
- name: Output Release URL - name: Output Release URL
+31 -216
View File
@@ -1,9 +1,8 @@
name: '[BETA] Create YouTube Plus app' name: '[BETA] Create YouTube Plus app'
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
enable_youpip: enable_youpip:
description: "Integrate YouPiP" description: "Integrate YouPiP"
type: boolean type: boolean
@@ -28,6 +27,12 @@ on:
required: true required: true
default: false default: false
enable_ytabc:
description: "Integrate YTABConfig"
type: boolean
required: true
default: false
enable_demc: enable_demc:
description: "Integrate DontEatMyContent" description: "Integrate DontEatMyContent"
type: boolean type: boolean
@@ -69,246 +74,56 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
build: build-tweaks:
name: uses: ./.github/workflows/_build_tweaks.yml
with:
enable_youpip: ${{ inputs.enable_youpip }}
enable_ytuhd: ${{ inputs.enable_ytuhd }}
enable_yq: ${{ inputs.enable_yq }}
enable_ryd: ${{ inputs.enable_ryd }}
enable_ytabc: ${{ inputs.enable_ytabc }}
enable_demc: ${{ inputs.enable_demc }}
tweak_url: ${{ inputs.tweak_url }}
package:
name: Package IPA (Beta)
runs-on: macos-latest runs-on: macos-latest
needs: build-tweaks
permissions: permissions:
contents: write contents: write
steps: steps:
- name: Checkout Main - name: Download built debs
uses: actions/checkout@v6.0.2 uses: actions/download-artifact@v7
with: with:
path: main name: built-debs
submodules: recursive path: ${{ github.workspace }}
- name: Hide sensitive inputs - name: Hide sensitive inputs
uses: levibostian/action-hide-sensitive-inputs@v1.1.1 uses: levibostian/action-hide-sensitive-inputs@v1
with: with:
exclude_inputs: bundle_id,display_name,enable_demc,enable_ryd,enable_youpip,enable_yq,enable_ytuhd,info_note exclude_inputs: bundle_id,display_name,enable_demc,enable_ryd,enable_ytabc,enable_youpip,enable_yq,enable_ytuhd,info_note
- name: Download and validate IPA - name: Download and validate IPA
run: | run: |
wget "${{ inputs.ipa_url }}" --no-verbose -O ${{ github.workspace }}/youtube.ipa wget "${{ github.event.inputs.ipa_url }}" --no-verbose -O youtube.ipa
file_type=$(file --mime-type -b youtube.ipa)
file_type=$(file --mime-type -b ${{ github.workspace }}/youtube.ipa)
if [[ "$file_type" != "application/x-ios-app" && "$file_type" != "application/zip" ]]; then 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." echo "::error::Validation failed: The downloaded file is not a valid IPA. Detected type: $file_type."
exit 1 exit 1
fi fi
- name: Download and validate tweak
run: |
wget "${{ inputs.tweak_url }}" --no-verbose -O ${{ github.workspace }}/ytplus.deb
file_type=$(file --mime-type -b ${{ github.workspace }}/ytplus.deb)
if [[ "$file_type" != "application/vnd.debian.binary-package" ]]; then
echo "::error::Validation failed: The file is not a valid DEB file. 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@v5.0.3
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@v6.0.2
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 - name: Install cyan
run: pipx install --force https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip run: pipx install --force https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip
- 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 - name: Inject tweaks into IPA
run: | run: |
tweaks="ytplus.deb OpenYoutubeSafariExtension.appex" tweaks="ytplus.deb OpenYoutubeSafariExtension.appex"
for f in *.deb; do for f in *.deb; do
if [ -f "$f" ]; then [ -f "$f" ] && tweaks="$tweaks $f"
tweaks="$tweaks $f"
fi
done done
cyan -i youtube.ipa -o YouTubePlus_Beta.ipa -uwef $tweaks -n "${{ github.event.inputs.display_name }}" -b ${{ github.event.inputs.bundle_id }}
cyan -i youtube.ipa -o YouTubePlus_Beta.ipa -uwef $tweaks -n "${{ inputs.display_name }}" -b ${{ inputs.bundle_id }}
- name: Upload to GitHub Releases - name: Upload to GitHub Releases
uses: softprops/action-gh-release@v2.5.0 uses: softprops/action-gh-release@v2.5.0