@@ -3,12 +3,24 @@ name: Build and Release YTMusicUltimate
3
3
on :
4
4
workflow_dispatch :
5
5
inputs :
6
- decrypted_youtube_music_url :
7
- description : " The direct URL to the decrypted YouTube Music ipa (Upload a decrypted .ipa file to Dropbox and input its URL here.) "
6
+ ipa_url :
7
+ description : " URL to the decrypted IPA file"
8
8
default : " "
9
9
required : true
10
- type : string
11
-
10
+ type : string
11
+
12
+ display_name :
13
+ description : " App Name (Optional)"
14
+ default : " YouTube Music"
15
+ required : true
16
+ type : string
17
+
18
+ bundle_id :
19
+ description : " BundleID (Optional)"
20
+ default : " com.google.ios.youtubemusic"
21
+ required : true
22
+ type : string
23
+
12
24
concurrency :
13
25
group : ${{ github.workflow }}-${{ github.ref }}
14
26
cancel-in-progress : true
@@ -27,31 +39,46 @@ jobs:
27
39
path : main
28
40
submodules : recursive
29
41
42
+ - name : Hide sensitive inputs
43
+ uses : levibostian/action-hide-sensitive-inputs@v1
44
+
45
+ - name : Validate IPA URL
46
+ run : |
47
+ curl -L -r 0-1023 -o sample.part "${{ inputs.ipa_url }}" > /dev/null 2>&1
48
+ file_type=$(file --mime-type -b sample.part)
49
+
50
+ if [[ "$file_type" != "application/x-ios-app" && "$file_type" != "application/zip" ]]; then
51
+ echo "::error::Validation failed: The file is not a valid IPA file. Detected type: $file_type."
52
+ exit 1
53
+ fi
54
+
30
55
- name : Install Dependencies
31
- run : brew install ldid dpkg make coreutils
56
+ run : brew install make ldid
32
57
33
58
- name : Set PATH environment variable
34
- run : echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
35
-
36
- - name : Setup Theos
37
- uses : actions/checkout@v4.1.7
38
- with :
39
- repository : theos/theos
40
- path : theos
41
- submodules : recursive
59
+ run : echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
42
60
43
- - name : SDK Caching
44
- id : SDK
61
+ - name : Cache Theos
62
+ id : theos
45
63
uses : actions/cache@v4.0.1
46
64
env :
47
- cache-name : iOS-16.5-SDK
65
+ cache-name : theos_cache_67db2ab
48
66
with :
49
- path : theos/sdks/
67
+ path : theos/
50
68
key : ${{ env.cache-name }}
51
69
restore-keys : ${{ env.cache-name }}
52
70
71
+ - name : Setup Theos
72
+ if : steps.theos.outputs.cache-hit != 'true'
73
+ uses : actions/checkout@v4.1.7
74
+ with :
75
+ repository : theos/theos
76
+ ref : 67db2ab8d950910161730de77c322658ea3e6b44
77
+ path : ${{ github.workspace }}/theos
78
+ submodules : recursive
79
+
53
80
- name : Download iOS SDK
54
- if : steps.SDK .outputs.cache-hit != 'true'
81
+ if : steps.theos .outputs.cache-hit != 'true'
55
82
run : |
56
83
git clone --quiet -n --depth=1 --filter=tree:0 https://github.com/theos/sdks/
57
84
cd sdks
@@ -61,12 +88,12 @@ jobs:
61
88
env :
62
89
THEOS : ${{ github.workspace }}/theos
63
90
64
- - name : Prepare YouTube Music iPA
65
- id : prepare_youtube_music
66
- run : wget "$YOUTUBE_MUSIC_URL" --no-verbose -O main/YouTubeMusic.ipa
91
+ - name : Install cyan
92
+ run : pipx install --force https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip
67
93
68
- env :
69
- YOUTUBE_MUSIC_URL : ${{ inputs.decrypted_youtube_music_url }}
94
+ - name : Download YouTube Music
95
+ id : download_youtube_music
96
+ run : wget "${{ inputs.ipa_url }}" --no-verbose -O ${{ github.workspace }}/main/ytm.ipa
70
97
71
98
- name : Build Tweak for Sideloading
72
99
id : build_package
@@ -76,23 +103,20 @@ jobs:
76
103
env :
77
104
THEOS : ${{ github.workspace }}/theos
78
105
79
- - name : Install Cyan
80
- run : |
81
- brew install pipx
82
- pipx install --force https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip
83
-
84
106
- name : Inject tweak into provided IPA
85
107
run : |
86
108
cd ${{ github.workspace }}/main/packages
87
109
tweakName=$(ls)
88
110
cd ${{ github.workspace }}/main
89
- cyan -i YouTubeMusic .ipa -o packages/YTMusicUltimate.ipa -uwsf packages/$tweakName
111
+ cyan -i ytm .ipa -o packages/YTMusicUltimate.ipa -uwsf packages/$tweakName -n "${{ inputs.display_name }}" -b ${{ inputs.bundle_id }}
90
112
91
113
- name : Create Release
92
- id : create_release
93
114
uses : softprops/action-gh-release@v2.0.6
94
115
with :
95
- tag_name : YTMusicUltimate-v${{ github.run_number }}
96
116
name : YTMusicUltimate-v${{ github.run_number }}
97
117
files : main/packages/*.ipa
98
118
draft : true
119
+
120
+ - name : Output Release URL
121
+ run : |
122
+ echo "::notice::Release available at: https://github.com/${{ github.repository }}/releases"
0 commit comments