This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
127 lines (108 loc) · 3.72 KB
/
build-release.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
name: Build Release
on:
push:
branches:
- main
tags:
- '*'
env:
THEOS: ''
GIT_TAG: ''
XCODE_VERSION: '15.0.1'
jobs:
build:
name: Build and upload release package for TrollStore
runs-on: macos-13
steps:
- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Install Homebrew Dependencies
run: |
brew install dpkg ldid make libplist openssl@3
echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH
- name: Checkout XXTouchNG/theos
uses: actions/checkout@v3
with:
repository: XXTouchNG/theos
ref: 78ee784d8d3238982c9abdc58cd39919263648b1
path: theos
submodules: recursive
- name: Add THEOS Environment Variables
run: |
rm -rf $GITHUB_WORKSPACE/theos/sdks
echo "THEOS=$GITHUB_WORKSPACE/theos" >> $GITHUB_ENV
- name: Restore Additional SDKs
id: cached-sdks-restore
uses: actions/cache/restore@v3
with:
path: ${{ env.THEOS }}/sdks
key: ${{ runner.os }}-sdks-${{ env.XCODE_VERSION }}
- if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }}
name: Checkout theos/sdks
uses: actions/checkout@v3
with:
repository: theos/sdks
ref: master
path: ${{ env.THEOS }}/sdks
- if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }}
name: Checkout XXTouchNG/tbd
uses: actions/checkout@v3
with:
repository: XXTouchNG/tbd
ref: 30a6883092221e13d814c02ac41af1e565a40617
path: tbd
- if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }}
name: Build tbd
run: |
cd $GITHUB_WORKSPACE/tbd
make
cp bin/tbd /usr/local/bin/tbd
- if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }}
name: Generate Additional SDKs
run: |
cd $THEOS/sdks
python3 create_patched_sdk.py --no-overwrite -x $(dirname $(dirname $(xcode-select -p)))
- if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }}
name: Save Additional SDKs
id: cached-sdks-save
uses: actions/cache/save@v3
with:
path: ${{ env.THEOS }}/sdks
key: ${{ steps.cached-sdks-restore.outputs.cache-primary-key }}
- name: Checkout
uses: actions/checkout@v3
with:
repository: Lessica/TrollSpeed
ref: main
path: TrollSpeed
submodules: recursive
- name: Setup Build Environment
run: |
echo "Available SDKs: $(find $THEOS/sdks -name "*.sdk" -maxdepth 1 -print)"
echo "FINALPACKAGE=1" >> $GITHUB_ENV
cd $GITHUB_WORKSPACE/TrollSpeed
git fetch --tags
echo "GIT_TAG=$(git describe --tags --always --abbrev=0)" >> $GITHUB_ENV
- name: Build Package
run: |
cd $GITHUB_WORKSPACE/TrollSpeed
./gen-control.sh ${{ env.GIT_TAG }}
FINALPACKAGE=1 make stage
- name: Collect Symbols
run: |
cd $GITHUB_WORKSPACE/TrollSpeed
find .theos/obj -name "*.dSYM" -print | zip -r packages/TrollSpeed_${{ env.GIT_TAG }}_symbols.zip -@
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: TrollSpeed_${{ env.GIT_TAG }}
path: |
TrollSpeed/packages/TrollSpeed_*.tipa
- name: Upload Symbols
uses: actions/upload-artifact@v3
with:
name: TrollSpeed_${{ env.GIT_TAG }}_symbols
path: |
TrollSpeed/packages/TrollSpeed_${{ env.GIT_TAG }}_symbols.zip