forked from SoCuul/SCInsta
-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (114 loc) · 4.85 KB
/
Copy pathbuildapp.yml
File metadata and controls
138 lines (114 loc) · 4.85 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
# Inspired heavily by the following workflows
# https://github.com/arichornlover/uYouEnhanced/blob/main/.github/workflows/buildapp.yml
# https://github.com/ISnackable/YTCubePlus/blob/main/.github/workflows/Build.yml
# https://github.com/BandarHL/BHTwitter/actions/workflows/build.yml
name: Build and Package SCInsta
on:
workflow_dispatch:
inputs:
decrypted_instagram_url:
description: "The direct URL to the decrypted Instagram IPA"
default: ""
required: true
type: string
upload_artifact:
description: "Upload Artifact"
default: true
required: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build SCInsta
runs-on: macos-latest
permissions:
contents: write
steps:
- name: Checkout Main
uses: actions/checkout@v4
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/checkout@v4
with:
repository: theos/theos
ref: master
path: ${{ github.workspace }}/theos
submodules: recursive
- name: SDK Caching
id: SDK
uses: actions/cache@v4
env:
cache-name: iPhoneOS16.2.sdk
with:
path: ${{ github.workspace }}/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/xybp888/iOS-SDKs/
cd iOS-SDKs
git sparse-checkout set --no-cone iPhoneOS16.2.sdk
git checkout
mv *.sdk $THEOS/sdks
env:
THEOS: ${{ github.workspace }}/theos
- name: Prepare Instagram IPA
run: |
cd main
mkdir -p packages
wget "$Instagram_URL" --no-verbose -O packages/com.burbn.instagram.ipa
ls -la packages
env:
THEOS: ${{ github.workspace }}/theos
Instagram_URL: ${{ inputs.decrypted_instagram_url }}
- name: Get SCInsta Version
id: scinsta_version
run: |
SCINSTA_VERSION=$(awk '/Version:/ {print $2}' main/control)
echo "SCINSTA_VERSION=${SCINSTA_VERSION}" >> "$GITHUB_ENV"
echo "version=${SCINSTA_VERSION}" >> "$GITHUB_OUTPUT"
- name: Build SCInsta tweak for sideloading (as IPA)
run: |
pip install --force-reinstall https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip
cd main
curl -Lo ipapatch https://github.com/asdfzxcvbn/ipapatch/releases/download/v2.1.3/ipapatch.macos-arm64
chmod +x ipapatch
export PATH=.:$PATH
ls -la
./build.sh sideload
ls -la packages
env:
THEOS: ${{ github.workspace }}/theos
- name: Rename IPA to include version info
run: |
cd main/packages
mv "$(ls -t | head -n1)" "SCInsta_sideloaded_v${SCINSTA_VERSION}.ipa"
- name: Pass package name to upload action
id: package_name
run: |
echo "package=$(ls -t main/packages | head -n1)" >> "$GITHUB_OUTPUT"
- name: Upload Artifact
if: ${{ inputs.upload_artifact }}
uses: actions/upload-artifact@v4
with:
name: SCInsta_sideloaded_v${{ steps.scinsta_version.outputs.version }}
path: ${{ github.workspace }}/main/packages/${{ steps.package_name.outputs.package }}
if-no-files-found: error
- name: Create Release
uses: softprops/action-gh-release@v2.0.6
with:
name: SCInsta_sideloaded_v${{ steps.scinsta_version.outputs.version }}
files: ${{ github.workspace }}/main/packages/SCInsta_sideloaded_v*.ipa
draft: true
- name: Output Release URL
run: |
echo "::notice::Release available at: https://github.com/${{ github.repository }}/releases"