forked from dayanch96/YTMusicUltimate
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (111 loc) · 3.89 KB
/
main.yml
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
# I modified the github action from @arichornlover 's uYouEnhanced repo, but the original idea is by @ISnackable. Thanks to both of them!
# https://github.com/ISnackable/YTCubePlus/blob/main/.github/workflows/Build.yml
name: Build and Release YTMusicUltimate
on:
workflow_dispatch:
inputs:
decrypted_youtube_music_url:
description: "The direct URL to the decrypted YouTube Music ipa (Upload a decrypted .ipa file to Dropbox and input its URL here.)"
default: ""
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build YTMusicUltimate
runs-on: macos-12
permissions:
contents: write
steps:
- name: Checkout Main
uses: actions/[email protected]
with:
path: main
submodules: recursive
- name: Install Dependencies
run: brew install ldid dpkg make
- name: Set PATH environment variable
run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
- name: Setup Theos
uses: actions/[email protected]
with:
repository: theos/theos
ref: 4bcc52914e0eeca719288522938185decaa8a1cb
path: theos
submodules: recursive
- name: SDK Caching
id: SDK
uses: actions/[email protected]
env:
cache-name: iOS-16.2-SDK
with:
path: theos/sdks/
key: ${{ env.cache-name }}
restore-keys: ${{ env.cache-name }}
- name: Download iOS SDK
if: steps.SDK.outputs.cache-hit != 'true'
run: |
git clone --quiet -n --depth=1 --filter=tree:0 https://github.com/arichorn/sdks/
cd sdks
git sparse-checkout set --no-cone iPhoneOS16.2.sdk
git checkout
mv *.sdk $THEOS/sdks
env:
THEOS: ${{ github.workspace }}/theos
- name: Setup Theos Jailed
uses: actions/[email protected]
with:
repository: qnblackcat/theos-jailed
ref: master
path: theos-jailed
submodules: recursive
- name: Install Theos Jailed
run: |
./theos-jailed/install
env:
THEOS: ${{ github.workspace }}/theos
- name: Install Azule
run: |
cd ${{ github.workspace }}/main
git clone https://github.com/Al4ise/Azule
sudo ln -sf ~/Azule/azule /usr/local/bin/azule
- name: Prepare YouTube Music iPA
id: prepare_youtube_music
run: |
wget "$YOUTUBE_MUSIC_URL" --no-verbose -O main/YouTubeMusic.ipa
env:
YOUTUBE_MUSIC_URL: ${{ inputs.decrypted_youtube_music_url }}
- name: Build Tweak for Sideloading
id: build_package
run: |
cd ${{ github.workspace }}/main
make clean package SIDELOADING=1
env:
THEOS: ${{ github.workspace }}/theos
- name: Inject tweak into provided IPA
run: |
brew install coreutils
cd ${{ github.workspace }}/main/packages
tweakName=$(ls)
cd ${{ github.workspace }}/main
./Azule/azule -i $PWD/YouTubeMusic.ipa -o $PWD/packages/YTMusicUltimate.ipa -f $PWD/packages/$tweakName
- name: Remove the Watch folder
run: |
cd ${{ github.workspace }}/main/packages
mv YTMusicUltimate.ipa YTMusicUltimate.zip
unzip YTMusicUltimate.zip
cd Payload/YoutubeMusic.app
rm -rf Watch
cd ../..
zip -r YTMusicUltimate.ipa Payload
rm -rf Payload
- name: Create Release
id: create_release
uses: softprops/[email protected]
with:
tag_name: YTMusicUltimate-v${{ github.run_number }}
name: YTMusicUltimate-v${{ github.run_number }}
files: main/packages/*.ipa
draft: true