-
Notifications
You must be signed in to change notification settings - Fork 9
163 lines (136 loc) · 5.33 KB
/
Copy pathbuild.yml
File metadata and controls
163 lines (136 loc) · 5.33 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: Compile & Release Tweak
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: write
jobs:
build-modern:
runs-on: macos-14
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
outputs:
version: ${{ steps.get_version.outputs.VERSION }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Theos
uses: Randomblock1/theos-action@v1
with:
theos-sdks: 'https://github.com/theos/sdks'
- name: Download iPhoneOS16.5.sdk
run: |
mkdir -p $THEOS/sdks
curl -LO https://github.com/theos/sdks/releases/latest/download/iPhoneOS16.5.sdk.tar.xz
tar -xf iPhoneOS16.5.sdk.tar.xz -C $THEOS/sdks/
rm *.tar.xz
- name: Fix Script Permissions
run: |
chmod +x layout/DEBIAN/prerm || true
chmod +x layout/DEBIAN/postinst || true
- name: Extract Tweak Version
id: get_version
run: |
VERSION=$(grep -i '^Version:' control | awk '{print $2}')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Prepare Output Directory
run: mkdir -p output
- name: Build Modern Targets (iOS 15+)
run: |
rm -rf vendor/AltList.framework
cp -R vendor/AltList_New.framework vendor/AltList.framework
make clean
make package FINALPACKAGE=1 SYSROOT=$THEOS/sdks/iPhoneOS16.5.sdk TARGET="iphone:clang:16.5:15.0" ARCHS="arm64 arm64e"
mv packages/*.deb output/com.eolnmsuk.antidarksword_${{ env.VERSION }}_iphoneos-arm.deb
make clean
make package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless SYSROOT=$THEOS/sdks/iPhoneOS16.5.sdk TARGET="iphone:clang:16.5:15.0" ARCHS="arm64 arm64e"
mv packages/*.deb output/com.eolnmsuk.antidarksword_${{ env.VERSION }}_iphoneos-arm64.deb
cd AntiDarkSwordTF
make clean
make FINALPACKAGE=1 SYSROOT=$THEOS/sdks/iPhoneOS16.5.sdk TARGET="iphone:clang:16.5:15.0" ARCHS="arm64 arm64e"
DYLIB=$(find .theos/obj -name "AntiDarkSword*.dylib" | head -1)
cp "$DYLIB" "../output/AntiDarkSword_${{ env.VERSION }}_TrollFools.dylib"
- name: Upload Modern Artifacts
uses: actions/upload-artifact@v4
with:
name: AntiDarkSword-Modern
path: output/*
build-legacy:
runs-on: macos-14
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
outputs:
version: ${{ steps.get_version.outputs.VERSION }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Theos
uses: Randomblock1/theos-action@v1
with:
theos-sdks: 'https://github.com/theos/sdks'
- name: Download iPhoneOS14.5.sdk
run: |
mkdir -p $THEOS/sdks
curl -LO https://github.com/theos/sdks/releases/latest/download/iPhoneOS14.5.sdk.tar.xz
tar -xf iPhoneOS14.5.sdk.tar.xz -C $THEOS/sdks/
rm *.tar.xz
- name: Fix Script Permissions
run: |
chmod +x layout/DEBIAN/prerm || true
chmod +x layout/DEBIAN/postinst || true
- name: Extract Tweak Version
id: get_version
run: |
VERSION=$(grep -i '^Version:' control | awk '{print $2}')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Prepare Output Directory
run: mkdir -p output
- name: Build Legacy Target (iOS 13–14)
run: |
rm -rf vendor/AltList.framework
cp -R vendor/AltList_Old.framework vendor/AltList.framework
lipo -thin arm64 vendor/AltList.framework/AltList -output vendor/AltList.framework/AltList
make clean
make package FINALPACKAGE=1 SYSROOT=$THEOS/sdks/iPhoneOS14.5.sdk TARGET="iphone:clang:14.5:13.0" ARCHS="arm64"
mv packages/*.deb output/com.eolnmsuk.antidarksword_${{ env.VERSION }}_iphoneos-arm_legacy.deb
- name: Upload Legacy Artifacts
uses: actions/upload-artifact@v4
with:
name: AntiDarkSword-Legacy
path: output/*
release:
needs: [build-modern, build-legacy]
runs-on: macos-14
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
VERSION: ${{ needs.build-modern.outputs.version }}
steps:
- name: Download Modern Artifacts
uses: actions/download-artifact@v4
with:
name: AntiDarkSword-Modern
path: output/
- name: Download Legacy Artifacts
uses: actions/download-artifact@v4
with:
name: AntiDarkSword-Legacy
path: output/
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.VERSION }}-b${{ github.run_number }}
name: "AntiDarkSword v${{ env.VERSION }}"
files: output/*
draft: true
body: |
Automated builds of AntiDarkSword v${{ env.VERSION }}.
### Compatibility Guide
| File | For |
|---|---|
| `*_iphoneos-arm64.deb` | iOS 15+ Rootless (all models) |
| `*_iphoneos-arm.deb` | iOS 15+ Rootful (all models) |
| `*_iphoneos-arm_legacy.deb` | iOS 13–14 Rootful (A9 - A11) |
| `*_TrollFools.dylib` | iOS 15+ TrollStore / TrollFools (all models) |