Skip to content

Build

Build #15

Workflow file for this run

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