-
Notifications
You must be signed in to change notification settings - Fork 18
65 lines (54 loc) · 1.68 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
name: Build
on:
workflow_dispatch:
repository_dispatch:
types: [build]
jobs:
build:
if: github.event.repository.owner.id == github.event.sender.id
name: Build with Theos
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Theos
uses: Randomblock1/theos-action@v1
- name: Install libarchive
run: |
brew install libarchive
- name: Patch TrollStore
run: |
git clone https://github.com/opa334/TrollStore build --recurse-submodules
cd build
git checkout $(git describe --tags --abbrev=0)
# Apply patches
patch -p1 < ../patches/001-Shared.patch
if [ "$?" -ne 0 ]; then
echo "Error applying Shared patch ..."
exit 1
fi
patch -p1 < ../patches/003-TrollStore.patch
if [ "$?" -ne 0 ]; then
echo "Error applying TrollStore patch ..."
exit 1
fi
echo WORKDIR="$(pwd)" >> "$GITHUB_ENV"
echo VERSION="$(git describe --tags --abbrev=0)" >> "$GITHUB_ENV"
# drop build ipa by default
sed -i '' 's/build_installer15 build_installer64e//g' Makefile
# Copy Localizable to Resources
cp -a ../TrollStore/* TrollStore/Resources/
- name: Build TrollStore
working-directory: ${{ env.WORKDIR }}
run: |
make
- name: Create release
uses: sbwml/release-action@main
with:
name: ${{ env.VERSION }}
allowUpdates: true
tag: ${{ env.VERSION }}
commit: main
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: ${{ env.WORKDIR }}/_build/TrollStore.tar