feat: build iOS application package via github actions
This commit is contained in:
parent
87a567ad6a
commit
dd8b3dfa24
1 changed files with 65 additions and 26 deletions
91
.github/workflows/build.yml
vendored
91
.github/workflows/build.yml
vendored
|
|
@ -1,20 +1,27 @@
|
||||||
name: Build
|
name: Build Pyoncord
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
workflow_dispatch:
|
inputs:
|
||||||
|
ipa_url:
|
||||||
|
description: "Direct link to the decrypted IPA"
|
||||||
|
default: ""
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-tweak:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: macos-14
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [macos-latest]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Xcode Select Version
|
||||||
|
uses: maxim-lobanov/setup-xcode@v1
|
||||||
|
with:
|
||||||
|
xcode-version: '15.1.0'
|
||||||
|
|
||||||
- name: Check cache
|
- name: Check cache
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -22,34 +29,66 @@ jobs:
|
||||||
|
|
||||||
- name: Use cache
|
- name: Use cache
|
||||||
id: cache
|
id: cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/theos
|
path: ${{ github.workspace }}/theos
|
||||||
key: ${{ runner.os }}-${{ env.upstream_heads }}
|
key: ${{ runner.os }}-${{ env.upstream_heads }}
|
||||||
|
|
||||||
- name: Prepare Theos
|
- name: Prepare Theos
|
||||||
uses: Randomblock1/theos-action@v1.3
|
uses: Randomblock1/theos-action@v1
|
||||||
with:
|
|
||||||
orion: "true"
|
|
||||||
|
|
||||||
- name: Build rootful package
|
- name: Build packages
|
||||||
run: |
|
run: |
|
||||||
rm -f packages/*
|
export PATH="$(brew --prefix make)/libexec/gnubin:$PATH"
|
||||||
make package FINALPACKAGE=1
|
export THEOS="${{ github.workspace }}/theos"
|
||||||
|
rm -rf packages && make clean && make package FINALPACKAGE=1 && make package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
|
||||||
|
|
||||||
- name: Upload package
|
- name: Upload package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "Rootful package built by ${{ matrix.os }}"
|
name: "package"
|
||||||
path: ${{ github.workspace }}/packages/*-arm.deb
|
path: ${{ github.workspace }}/packages/*-arm.deb
|
||||||
|
|
||||||
- name: Build rootless package
|
|
||||||
run: |
|
|
||||||
rm -f packages/*
|
|
||||||
make clean package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless
|
|
||||||
|
|
||||||
- name: Upload rootless package
|
- name: Upload rootless package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "Rootless package built by ${{ matrix.os }}"
|
name: "rootless package"
|
||||||
path: ${{ github.workspace }}/packages/*-arm64.deb
|
path: ${{ github.workspace }}/packages/*-arm64.deb
|
||||||
|
|
||||||
|
build-ipa:
|
||||||
|
runs-on: macos-14
|
||||||
|
needs: build-tweak
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Xcode Select Version
|
||||||
|
uses: maxim-lobanov/setup-xcode@v1
|
||||||
|
with:
|
||||||
|
xcode-version: '15.1.0'
|
||||||
|
|
||||||
|
- name: Download build artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Download and Unzip Orion
|
||||||
|
run: |
|
||||||
|
curl -L -o Orion.zip https://github.com/theos/orion/releases/download/1.0.1/Orion_1.0.1.zip
|
||||||
|
unzip Orion.zip
|
||||||
|
|
||||||
|
- name: Download Discord IPA
|
||||||
|
run: |
|
||||||
|
curl -L -o discord.ipa ${{ github.event.inputs.ipa_url }}
|
||||||
|
|
||||||
|
- name: Inject tweak
|
||||||
|
run: |
|
||||||
|
mkdir -p ${{ github.workspace }}/build
|
||||||
|
git clone https://github.com/Al4ise/Azule.git
|
||||||
|
./Azule/azule -i discord.ipa -o ${{ github.workspace }}/build -f ${{ github.workspace }}/dev.theos.orion14_1.0.1_iphoneos-arm.deb ${{ github.workspace }}/com.pyoncord.bunny_0.0.1_iphoneos-arm.deb
|
||||||
|
mv "${{ github.workspace }}/build/"*.ipa "${{ github.workspace }}/build/Pyoncord.ipa"
|
||||||
|
|
||||||
|
- name: Upload Pyoncord.ipa as artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ipa
|
||||||
|
path: ${{ github.workspace }}/build/Pyoncord.ipa
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue