mirror of
https://github.com/YTLitePlus/YTLitePlus.git
synced 2026-04-20 06:02:07 +00:00
Now you just paste the decrypted IPA download link and YouTube version into the "Run workflow" form on the Actions tab and hit build. https://claude.ai/code/session_01FD8kBzc7yv5Fdf9G7Z2ZkE
125 lines
4.5 KiB
YAML
125 lines
4.5 KiB
YAML
name: Build YTLite IPA
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
ipa_url:
|
|
description: "Decrypted YouTube IPA download URL (from armconverter.com etc)"
|
|
required: true
|
|
type: string
|
|
youtube_version:
|
|
description: "YouTube version (e.g. 21.10.2)"
|
|
required: true
|
|
default: "21.10.2"
|
|
type: string
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Build tweaked YouTube IPA
|
|
runs-on: macos-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
YTLITE_VERSION: "3.0.1"
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4.1.1
|
|
with:
|
|
path: main
|
|
submodules: recursive
|
|
|
|
- name: Download and validate IPA
|
|
run: |
|
|
echo "Downloading IPA from provided URL..."
|
|
wget "${{ inputs.ipa_url }}" --no-verbose -O ${{ github.workspace }}/youtube.ipa || true
|
|
|
|
if [ ! -f "${{ github.workspace }}/youtube.ipa" ] || [ ! -s "${{ github.workspace }}/youtube.ipa" ]; then
|
|
echo "::error::IPA download failed. Check your URL / token."
|
|
exit 1
|
|
fi
|
|
|
|
file_type=$(file --mime-type -b ${{ github.workspace }}/youtube.ipa)
|
|
if [[ "$file_type" != "application/x-ios-app" && "$file_type" != "application/zip" ]]; then
|
|
echo "::error::Not a valid IPA. Detected type: $file_type"
|
|
exit 1
|
|
fi
|
|
echo "IPA downloaded and validated successfully."
|
|
|
|
- name: Install Dependencies
|
|
run: brew install make ldid
|
|
|
|
- name: Set PATH environment variable
|
|
run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
|
|
|
|
- name: Setup Theos
|
|
uses: actions/checkout@v4.1.7
|
|
with:
|
|
repository: theos/theos
|
|
ref: 67db2ab8d950910161730de77c322658ea3e6b44
|
|
path: ${{ github.workspace }}/theos
|
|
submodules: recursive
|
|
|
|
- name: Download iOS SDK
|
|
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: Clone Dependencies
|
|
run: |
|
|
# Clone as siblings to main/ since source uses ../YouTubeHeader/ and ../protobuf/ relative paths
|
|
git clone --quiet --depth=1 https://github.com/PoomSmart/YouTubeHeader.git ${{ github.workspace }}/YouTubeHeader
|
|
git clone --quiet --depth=1 --branch v3.21.12 https://github.com/protocolbuffers/protobuf.git ${{ github.workspace }}/protobuf
|
|
|
|
- name: Create roothide stub
|
|
run: |
|
|
printf '#ifndef ROOTHIDE_H\n#define ROOTHIDE_H\n#ifndef jbroot\n#define jbroot(path) path\n#endif\n#ifndef rootfs\n#define rootfs(path) path\n#endif\n#endif\n' > $THEOS/include/roothide.h
|
|
env:
|
|
THEOS: ${{ github.workspace }}/theos
|
|
|
|
- name: Build YTLite
|
|
run: |
|
|
cd ${{ github.workspace }}/main
|
|
make clean package DEBUG=0 FINALPACKAGE=1
|
|
mv packages/*.deb ${{ github.workspace }}/ytlite.deb
|
|
env:
|
|
THEOS: ${{ github.workspace }}/theos
|
|
|
|
- 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: Inject tweak into IPA
|
|
run: |
|
|
cyan -i youtube.ipa -o YTLite_${YTLITE_VERSION}_YouTube-${{ inputs.youtube_version }}.ipa -uwef ytlite.deb OpenYoutubeSafariExtension.appex
|
|
|
|
- name: Upload IPA as artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: YTLite_${{ env.YTLITE_VERSION }}_YouTube-${{ inputs.youtube_version }}
|
|
path: YTLite_${{ env.YTLITE_VERSION }}_YouTube-${{ inputs.youtube_version }}.ipa
|
|
|
|
- name: Upload to GitHub Releases
|
|
uses: softprops/action-gh-release@v2.0.1
|
|
with:
|
|
tag_name: ytlite-v${{ env.YTLITE_VERSION }}-yt${{ inputs.youtube_version }}
|
|
name: YTLite v${{ env.YTLITE_VERSION }} (YouTube ${{ inputs.youtube_version }})
|
|
files: YTLite_${{ env.YTLITE_VERSION }}_YouTube-${{ inputs.youtube_version }}.ipa
|
|
draft: true
|