forked from dayanch96/YTMusicUltimate
-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (102 loc) · 3.61 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
name: Build and Release YTMusicUltimate
on:
workflow_dispatch:
inputs:
ipa_url:
description: "URL to the decrypted IPA file"
default: ""
required: true
type: string
display_name:
description: "App Name (Optional)"
default: "YouTube Music"
required: true
type: string
bundle_id:
description: "BundleID (Optional)"
default: "com.google.ios.youtubemusic"
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build YTMusicUltimate
runs-on: macos-latest
permissions:
contents: write
steps:
- name: Checkout Main
uses: actions/[email protected]
with:
path: main
submodules: recursive
- name: Hide sensitive inputs
uses: levibostian/action-hide-sensitive-inputs@v1
- name: Validate IPA URL
run: |
curl -L -r 0-1023 -o sample.part "${{ inputs.ipa_url }}" > /dev/null 2>&1
file_type=$(file --mime-type -b sample.part)
if [[ "$file_type" != "application/x-ios-app" && "$file_type" != "application/zip" ]]; then
echo "::error::Validation failed: The file is not a valid IPA file. Detected type: $file_type."
exit 1
fi
- name: Install Dependencies
run: brew install make ldid
- name: Set PATH environment variable
run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
- name: Cache Theos
id: theos
uses: actions/[email protected]
env:
cache-name: theos_cache_67db2ab
with:
path: theos/
key: ${{ env.cache-name }}
restore-keys: ${{ env.cache-name }}
- name: Setup Theos
if: steps.theos.outputs.cache-hit != 'true'
uses: actions/[email protected]
with:
repository: theos/theos
ref: 67db2ab8d950910161730de77c322658ea3e6b44
path: ${{ github.workspace }}/theos
submodules: recursive
- name: Download iOS SDK
if: steps.theos.outputs.cache-hit != 'true'
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: Download YouTube Music
id: download_youtube_music
run: wget "${{ inputs.ipa_url }}" --no-verbose -O ${{ github.workspace }}/main/ytm.ipa
- 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: |
cd ${{ github.workspace }}/main/packages
tweakName=$(ls)
cd ${{ github.workspace }}/main
cyan -i ytm.ipa -o packages/YTMusicUltimate.ipa -uwsf packages/$tweakName -n "${{ inputs.display_name }}" -b ${{ inputs.bundle_id }}
- name: Create Release
uses: softprops/[email protected]
with:
name: YTMusicUltimate-v${{ github.run_number }}
files: main/packages/*.ipa
draft: true
- name: Output Release URL
run: |
echo "::notice::Release available at: https://github.com/${{ github.repository }}/releases"