-
Notifications
You must be signed in to change notification settings - Fork 36
151 lines (131 loc) · 4.97 KB
/
build.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: CI
on:
push:
workflow_dispatch:
inputs:
create_release:
description: "Build IPA and create draft release"
default: false
type: boolean
ipa_url:
description: "Direct URL to Decrypted IPA file"
type: string
required: false
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get package info
id: package_info
run: |
version=$(cat Makefile | grep "PACKAGE_VERSION =" | cut -d' ' -f3)
if [ -z $version ]; then
version=$(cat control | grep "Version:" | cut -d' ' -f2)
fi
echo "id=$(cat control | grep "Package:" | cut -d' ' -f2)" >> $GITHUB_OUTPUT
echo "version=$version" >> $GITHUB_OUTPUT
- name: Install dependencies
if: ${{ inputs.create_release }}
run: |
sudo apt update
sudo apt install -y build-essential checkinstall git autoconf automake libtool-bin rsync llvm xmlstarlet
curl -L https://github.com/libimobiledevice/libplist/releases/download/2.4.0/libplist-2.4.0.tar.bz2 | bzip2 -d | tar -x
cd libplist*
./configure
sudo make install
sudo ldconfig
- name: Download IPA (Auto)
if: ${{ inputs.create_release && !inputs.ipa_url }}
uses: level3tjg/decryptedappstore-action@main
with:
appstore_url: "https://apps.apple.com/us/app/twitch-live-streaming/id460177396"
cache: true
path: ${{ github.workspace }}/App.ipa
token: ${{ secrets.DECRYPTEDAPPSTORE_SESSION_TOKEN }}
- name: Download IPA (Manual)
if: ${{ inputs.create_release && inputs.ipa_url }}
run: |
curl -Lo "${{ github.workspace }}/App.ipa" "${{ inputs.ipa_url }}"
zip -T "${{ github.workspace }}/App.ipa"
- name: Download STS IPA
if: ${{ inputs.create_release }}
run: |
curl -Lo "${{ github.workspace }}/STS.ipa" "https://nextcloud.level3tjg.me/s/b2WcDdDMN3ZXkYf/download/tv.twitch_19.4.ipa"
zip -T "${{ github.workspace }}/STS.ipa"
- name: Download LTS IPA
if: ${{ inputs.create_release }}
run: |
curl -Lo "${{ github.workspace }}/LTS.ipa" "https://nextcloud.level3tjg.me/s/QEyiJD3FK6AfxTA/download/tv.twitch_12.8.1.ipa"
zip -T "${{ github.workspace }}/LTS.ipa"
- name: Get IPA Info
if: ${{ inputs.create_release }}
id: ipa_info
run: |
info=$(unzip -p "${{ github.workspace }}/App.ipa" Payload/*.app/Info.plist)
echo "bundle-id=$(echo $info | xmlstarlet sel -t -v "/plist/dict/key[text()=\"CFBundleIdentifier\"]/following-sibling::*[1]/text()")" >> $GITHUB_OUTPUT
echo "version=$(echo $info | xmlstarlet sel -t -v "/plist/dict/key[text()=\"CFBundleShortVersionString\"]/following-sibling::*[1]/text()")" >> $GITHUB_OUTPUT
- name: Setup theos
uses: level3tjg/theos-action@main
with:
cache: true
cache-dir-theos: ${{ github.workspace }}/theos
cache-dir-sdks: ${{ github.workspace }}/theos/sdks
- name: Checkout theos-jailed
if: ${{ inputs.create_release }}
uses: actions/checkout@v4
with:
repository: level3tjg/theos-jailed
path: theos-jailed
submodules: recursive
- name: Install theos-jailed
if: ${{ inputs.create_release }}
run: |
./theos-jailed/install
cd libplist*
sudo make uninstall
- name: Build rootless deb
run: make package
env:
FINALPACKAGE: ${{ inputs.create_release }}
THEOS_PACKAGE_SCHEME: rootless
- name: Build rootful deb
run: make clean package
env:
FINALPACKAGE: ${{ inputs.create_release }}
- name: Build IPA
if: ${{ inputs.create_release }}
run: make package
env:
FINALPACKAGE: 1
IPA: ${{ github.workspace }}/App.ipa
APP_VERSION: ${{ steps.ipa_info.outputs.version }}
- name: Build STS IPA
if: ${{ inputs.create_release }}
run: make package
env:
FINALPACKAGE: 1
IPA: ${{ github.workspace }}/STS.ipa
APP_VERSION: "19.4"
- name: Build LTS IPA
if: ${{ inputs.create_release }}
run: make package
env:
FINALPACKAGE: 1
IPA: ${{ github.workspace }}/LTS.ipa
APP_VERSION: "12.8.1"
LTS: 1
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.package_info.outputs.id }}_${{ steps.package_info.outputs.version }}
path: packages/*
- name: Create release
if: ${{ inputs.create_release }}
uses: softprops/action-gh-release@v2
with:
draft: true
files: packages/*
tag_name: v${{ steps.ipa_info.outputs.version }}-${{ steps.package_info.outputs.version }}