Skip to content

update

update #97

Workflow file for this run

name: "*** build tipa file ***"
on:
push:
branches:
- 'roothide'
paths-ignore:
- ".gitignore"
pull_request:
branches:
- 'roothide'
paths-ignore:
- ".gitignore"
workflow_dispatch:
schedule:
- cron: '0 0 1 1 *'
- cron: '0 0 1 4 *'
- cron: '0 0 30 6 *'
- cron: '0 0 28 9 *'
- cron: '0 0 27 12 *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: roothide
submodules: recursive
- name: Install Procursus
uses: dhinakg/procursus-action@main
with:
packages: ldid findutils sed coreutils make
- 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
gmake -j$(sysctl -n hw.physicalcpu) 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"
TAG=$(git describe --tags --abbrev=0 --always)
if [ -z "$TAG" ]; then
echo "No valid tag found; using '11' for credits."
CREDITS_TAG="11"
else
CREDITS_TAG="$TAG"
fi
typeset itemcount=$(plutil -extract items raw -expect array ./Application/Dopamine/UI/Settings/Credits.plist)
for ((i=0; i<$itemcount; i++)); do
if [ "$(plutil -extract items.$i.headerCellClass raw ./Application/Dopamine/UI/Settings/Credits.plist)" = "DOCreditsCell" ]; then
DOCreditsCellIndex=$i
fi
done;
plutil -insert items.$DOCreditsCellIndex.names -xml "<dict><key>name</key><string>${{ github.actor }}</string><key>link</key><string>https://github.com/${{ github.repository }} @ v${CREDITS_TAG}</string></dict>" -append ./Application/Dopamine/UI/Settings/Credits.plist
gmake -j$(sysctl -n hw.physicalcpu) NIGHTLY=1
mv ./Application/Dopamine.tipa "./Application/roothide-Dopamine2.tipa"
- name: Create or Update Release and Upload Asset
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: roothide
release_name: Roothide2 Beta Release
body: These are automatically updated builds of the latest commit.
draft: false
prerelease: false
overwrite: true
files: ${{ github.workspace }}/Application/roothide-Dopamine2.tipa