Repository navigation
112 lines (99 loc) · 4.26 KB
/
Copy pathmain.yml
File metadata and controls
112 lines (99 loc) · 4.26 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
name: "*** build ipa/tipa file ***"
on:
push:
branches:
- '*'
paths-ignore:
- ".gitignore"
pull_request:
branches:
- '*'
paths-ignore:
- ".gitignore"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: macos-latest
steps:
- name: Xcode Setup
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@main
with:
repository: roothide/Dopamine-roothide
submodules: recursive
- name: Install Procursus
uses: dhinakg/procursus-action@main
with:
packages: ldid findutils sed coreutils make
- name: Install better GNU Make
run: |
brew install make
echo "PATH=$(brew --prefix make)/libexec/gnubin:$PATH" >> $GITHUB_ENV
- name: Install THEOS
run: |
set -x
export BASEDIR="$(pwd)"
export THEOS="${BASEDIR}/theos"
mkdir -p $THEOS
curl -fsSL https://raw.githubusercontent.com/roothide/theos/master/bin/install-theos >> install-theos.sh
gsed -E "/^\s*get_theos\s*$/,+1 s/^(\s*)(get_sdks)\s*$/\1mkdir -p \${THEOS}\/sdks\n\1touch \${THEOS}\/sdks\/sdk\n\1\2/g" -i install-theos.sh
bash install-theos.sh
curl -L https://github.com/theos/sdks/releases/latest/download/iPhoneOS16.5.sdk.tar.xz --output $THEOS/sdks/iPhoneOS16.5.sdk.tar.xz
gunzip $THEOS/sdks/iPhoneOS16.5.sdk.tar.xz
tar -xf $THEOS/sdks/iPhoneOS16.5.sdk.tar -C $THEOS/sdks
rm $THEOS/sdks/iPhoneOS16.5.sdk.tar
cd $BASEDIR
- name: Build and Install trustcache
run: |
set -x
git clone https://github.com/CRKatri/trustcache
cd trustcache
export CFLAGS="$CFLAGS -I$(brew --prefix openssl)/include -arch arm64"
export LDFLAGS="$LDFLAGS -L$(brew --prefix openssl)/lib -arch arm64"
gmake -j$(sysctl -n hw.logicalcpu) OPENSSL=1
sudo cp trustcache /opt/procursus/bin/
- name: Set Environment Variables
run: |
set -x
T2=$(TZ=UTC-2 date +'%Y%m%d_%H%M%S')
TS=$(date -j -f "%Y%m%d_%H%M%S" "${T2}" +%s)
SHASH=$(git rev-parse --short HEAD)
echo "ctime=${T2}" >> $GITHUB_ENV
echo "ctimestamp=${TS}" >> $GITHUB_ENV
echo "shorthash=${SHASH}" >> $GITHUB_ENV
- name: Install libarchive
run: |
brew install libarchive
- name: Build
run: |
set -x
export BASEDIR="$(pwd)"
export THEOS="${BASEDIR}/theos"
plutil -insert items.4 -xml "<dict><key>cell</key><string>PSGroupCell</string><key>label</key><string>BUILDER</string></dict>" ./Application/Dopamine/UI/Settings/Credits.plist
plutil -insert items.5 -xml "<dict><key>cell</key><string>PSGroupCell</string><key>headerCellClass</key><string>DOCreditsCell</string><key>names</key><array><dict><key>name</key><string>${{ github.actor }}</string><key>link</key><string>https://github.com/${{ github.repository }}</string></dict></array></dict>" ./Application/Dopamine/UI/Settings/Credits.plist
gmake -j$(sysctl -n hw.logicalcpu) NIGHTLY=1
VERSION="("$(cat ./BaseBin/_external/basebin/.version)-$(cat ./BaseBin/_external/basebin/.version-roothide)-$(git rev-parse --short HEAD)")"-$(TZ=UTC git show -s --date=format-local:'%Y.%m.%d-%Z-%H.%M.%S' --format='%cd' HEAD)
mv ./Application/Dopamine.ipa "./Application/roothide-Dopamine-${VERSION}.ipa"
mv ./Application/Dopamine.tipa "./Application/roothide-Dopamine-${VERSION}.tipa"
echo "version=${VERSION}" >> $GITHUB_ENV
- name: Upload Artifact
id: dopamine-latest-upload
uses: actions/upload-artifact@main
with:
name: Dopamine
path: |
${{ github.workspace }}/Application/roothide-Dopamine-${{ env.version }}.ipa
archive: false
- name: Upload Artifact(TIPA)
id: dopamine-latest-upload-tipa
uses: actions/upload-artifact@main
with:
path: |
${{ github.workspace }}/Application/roothide-Dopamine-${{ env.version }}.tipa
archive: false