-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
138 lines (116 loc) · 4.14 KB
/
main.yml
File metadata and controls
138 lines (116 loc) · 4.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
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_ytabc:
description: "Integrate YTABConfig"
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-tweaks:
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
needs: build-tweaks
permissions:
contents: write
steps:
- name: Download built debs
uses: actions/download-artifact@v7
with:
name: built-debs
path: ${{ github.workspace }}
- name: Hide sensitive inputs
uses: levibostian/action-hide-sensitive-inputs@v1
with:
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
run: |
wget "${{ github.event.inputs.ipa_url }}" --no-verbose -O youtube.ipa
file_type=$(file --mime-type -b 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 cyan
run: pipx install --force https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip
- name: Inject tweaks into IPA
run: |
tweaks="ytplus.deb OpenYoutubeSafariExtension.appex"
for f in *.deb; do
[ -f "$f" ] && tweaks="$tweaks $f"
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 }}
- name: Upload to GitHub Releases
uses: softprops/action-gh-release@v2.5.0
with:
tag_name: ytp-${{ github.run_number }}
name: YouTubePlus v${{ github.event.inputs.tweak_version }} (${{ github.run_number }})
files: YouTubePlus_${{ github.event.inputs.tweak_version }}.ipa
draft: true
- name: Output Release URL
run: |
echo "::notice::Release available at: https://github.com/${{ github.repository }}/releases"