|
| 1 | +name: Create YouTube Plus app |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + ipa_url: |
| 7 | + description: "The direct URL to the decrypted IPA file" |
| 8 | + default: "" |
| 9 | + required: true |
| 10 | + type: string |
| 11 | + |
| 12 | + tweak_version: |
| 13 | + description: "The version of the tweak to use. Enter the version manually from dayanch96/YTLite/releases or leave default" |
| 14 | + default: "5.0" |
| 15 | + required: true |
| 16 | + type: string |
| 17 | + |
| 18 | +concurrency: |
| 19 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 20 | + cancel-in-progress: true |
| 21 | + |
| 22 | +jobs: |
| 23 | + build: |
| 24 | + name: |
| 25 | + runs-on: macos-12 |
| 26 | + permissions: |
| 27 | + contents: write |
| 28 | + |
| 29 | + steps: |
| 30 | + - name: Checkout Main |
| 31 | + |
| 32 | + with: |
| 33 | + path: main |
| 34 | + submodules: recursive |
| 35 | + |
| 36 | + - name: Install Dependencies |
| 37 | + run: brew install ldid dpkg make coreutils |
| 38 | + |
| 39 | + - name: Set PATH environment variable |
| 40 | + run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH |
| 41 | + |
| 42 | + - name: Cache Azule |
| 43 | + id: azule_cache |
| 44 | + |
| 45 | + env: |
| 46 | + cache-name: azule-cache |
| 47 | + with: |
| 48 | + path: ${{ github.workspace }}/Azule |
| 49 | + key: ${{ env.cache-name }} |
| 50 | + restore-keys: ${{ env.cache-name }} |
| 51 | + |
| 52 | + - name: Clone Azule Repository |
| 53 | + if: steps.azule_cache.outputs.cache-hit != 'true' |
| 54 | + run: | |
| 55 | + git clone https://github.com/Al4ise/Azule ${{ github.workspace }}/Azule |
| 56 | +
|
| 57 | + - name: Download YouTube |
| 58 | + id: download_youtube |
| 59 | + run: wget "${{ inputs.ipa_url }}" --no-verbose -O ${{ github.workspace }}/youtube.ipa |
| 60 | + |
| 61 | + - name: Download YouTube Plus |
| 62 | + id: download_ytp |
| 63 | + run: | |
| 64 | + deb_url="https://github.com/dayanch96/YTLite/releases/download/v${{ inputs.tweak_version }}/com.dvntm.ytlite_${{ inputs.tweak_version }}_iphoneos-arm.deb" |
| 65 | + wget "$deb_url" --no-verbose -O ${{ github.workspace }}/ytplus.deb |
| 66 | +
|
| 67 | + - name: Inject tweak into IPA |
| 68 | + run: | |
| 69 | + cd ${{ github.workspace }} |
| 70 | + ./Azule/azule -n YouTubePlus -i ${{ github.workspace }}/youtube.ipa -o ${{ github.workspace }} -f ${{ github.workspace }}/ytplus.deb |
| 71 | +
|
| 72 | + - name: Remove the Watch folder |
| 73 | + run: | |
| 74 | + cd ${{ github.workspace }} |
| 75 | + mv YouTubePlus.ipa YouTubePlus.zip |
| 76 | + unzip -q YouTubePlus.zip |
| 77 | + cd Payload/Youtube.app |
| 78 | + rm -rf Watch |
| 79 | + cd ../.. |
| 80 | + zip -qr YouTubePlus.ipa Payload |
| 81 | + rm -rf Payload |
| 82 | +
|
| 83 | + - name: Upload to GitHub Releases |
| 84 | + |
| 85 | + with: |
| 86 | + tag_name: v${{ github.run_number }} |
| 87 | + name: YouTubePlus-v${{ github.run_number }} |
| 88 | + files: YouTubePlus.ipa |
| 89 | + draft: true |
0 commit comments