Skip to content

Build IPA

Build IPA #74

Workflow file for this run

name: Build IPA
on:
workflow_dispatch:
# push:
# branches:
# - main
permissions:
contents: write
pages: write
id-token: write
jobs:
build:
runs-on: macos-15
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.0.0'
- name: Install Dependencies (Homebrew & Theos)
run: |
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "Setting up Homebrew..."
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> $HOME/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
echo "Installing Theos dependencies..."
brew install ldid dpkg
echo "Cloning Theos..."
git clone --recursive https://github.com/theos/theos.git $HOME/theos
echo 'export THEOS=$HOME/theos' >> $HOME/.zshrc
export THEOS=$HOME/theos
- uses: pnpm/action-setup@v3
with:
version: latest
- name: Sync node version and setup cache
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Build IPA Package
run: |
export THEOS=$HOME/theos
echo "Building IPA package..."
make package FINALPACKAGE=1 PACKAGE_FORMAT=ipa
- name: Get IPA File Path
id: find_ipa
run: |
IPA_PATH=$(find ./packages -name "*.ipa" | head -n 1)
echo "IPA File: $IPA_PATH"
echo "ipa_path=$IPA_PATH" >> $GITHUB_ENV
- name: Rename IPA File
run: |
NAME="${{ env.NAME }}"
VERSION="${{ env.VERSION }}"
IPA_PATH="${{ env.ipa_path }}"
DIR=$(dirname "$IPA_PATH")
NEW_NAME="${NAME}-${VERSION}.ipa"
NEW_PATH="${DIR}/${NEW_NAME}"
mv "$IPA_PATH" "$NEW_PATH"
echo "Renamed IPA: $NEW_PATH"
echo "ipa_path=$NEW_PATH" >> $GITHUB_ENV
ls -l $DIR
- name: Upload IPA to GitHub Releases
uses: softprops/action-gh-release@v1
with:
files: ${{ env.ipa_path }}
tag_name: '${{ env.NAME }}'
name: '${{ env.NAME }} v${{ env.VERSION }}'
body: '${{ env.PUBBODY }}'
draft: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}