Skip to content

Commit

Permalink
build: update actions build script
Browse files Browse the repository at this point in the history
  • Loading branch information
SoCuul committed Sep 23, 2024
1 parent baeeddd commit 3f42ff2
Showing 1 changed file with 113 additions and 145 deletions.
258 changes: 113 additions & 145 deletions .github/workflows/buildapp.yml
Original file line number Diff line number Diff line change
@@ -1,154 +1,122 @@
# Inspired heavily by the following amazing workflows!
# Inspired heavily by the following workflows
# https://github.com/arichornlover/uYouEnhanced/blob/main/.github/workflows/buildapp.yml
# https://github.com/ISnackable/YTCubePlus/blob/main/.github/workflows/Build.yml

name: Build and Package SCInsta

on:
workflow_dispatch:
inputs:
decrypted_instagram_url:
description: "The direct URL to the decrypted Instagram IPA"
default: ""
required: true
type: string
bundle_id:
description: "Modify the bundle ID. Not recommended"
default: "com.burbn.instagram"
required: true
type: string
app_name:
description: "Modify the name of the app on the Home Screen. Not recommended"
default: "Instagram"
required: true
type: string
upload_artifact:
description: "Upload Artifact"
default: true
required: false
type: boolean
workflow_dispatch:
inputs:
decrypted_instagram_url:
description: "The direct URL to the decrypted Instagram IPA"
default: ""
required: true
type: string
bundle_id:
description: "Modify the bundle ID. Not recommended"
default: "com.burbn.instagram"
required: true
type: string
app_name:
description: "Modify the name of the app on the Home Screen. Not recommended"
default: "Instagram"
required: true
type: string
upload_artifact:
description: "Upload Artifact"
default: true
required: false
type: boolean

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build SCInsta
runs-on: macos-latest
permissions:
contents: write

steps:
- name: Checkout Main
uses: actions/[email protected]
with:
path: main
submodules: recursive

- name: Install Dependencies
run: brew install ldid dpkg make

- name: Set PATH environment variable
run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH

- name: Setup Theos
uses: actions/[email protected]
with:
repository: theos/theos
ref: master
path: theos
submodules: recursive

- name: SDK Caching
id: SDK
uses: actions/[email protected]
env:
cache-name: iOS-14.5-SDK
with:
path: theos/sdks/
key: ${{ env.cache-name }}
restore-keys: ${{ env.cache-name }}

- name: Download iOS SDK
if: steps.SDK.outputs.cache-hit != 'true'
run: |
git clone --quiet -n --depth=1 --filter=tree:0 https://github.com/xybp888/iOS-SDKs/
cd iOS-SDKs
git sparse-checkout set --no-cone iPhoneOS14.5.sdk
git checkout
mv *.sdk $THEOS/sdks
env:
THEOS: ${{ github.workspace }}/theos

- name: Setup Theos Jailed
uses: actions/[email protected]
with:
repository: qnblackcat/theos-jailed
ref: master
path: theos-jailed
submodules: recursive

- name: Install Theos Jailed
run: |
./theos-jailed/install
env:
THEOS: ${{ github.workspace }}/theos

- name: Clone SCInsta Repo
run: |
git clone --recurse-submodules https://github.com/zeuikli/SCInsta
pwd
mkdir -p packages
- name: Prepare Instagram IPA
run: |
wget "$Instagram_URL" --no-verbose -O ${{ github.workspace }}/packages/com.burbn.instagram.ipa
env:
THEOS: ${{ github.workspace }}/theos
Instagram_URL: ${{ inputs.decrypted_instagram_url }}

- name: Build SCInsta tweak for sideloading (as IPA)
run: |
PROJECT_PATH=/Users/runner/work/SCInsta/SCInsta/SCInsta/
cd $PROJECT_PATH
CMAKE_OSX_ARCHITECTURES="arm64e;arm64"
bash -c "$(curl https://raw.githubusercontent.com/asdfzxcvbn/pyzule/main/install-pyzule.sh)"
ipaFile="/Users/runner/work/SCInsta/SCInsta/packages/com.burbn.instagram.ipa"
echo "IPA File: $ipaFile"
ls -l
./build.sh sideload
./build.sh rootless
./build.sh rootful
ls -l /Users/runner/work/SCInsta/SCInsta/SCInsta/packages
env:
THEOS: ${{ github.workspace }}/theos

- name: Upload Artifact
if: ${{ inputs.upload_artifact }}
uses: actions/[email protected]
with:
name: SCInsta_${{ github.run_number }}
path: /Users/runner/work/SCInsta/SCInsta/SCInsta/packages/SCInsta-sideloaded.ipa
if-no-files-found: error

- name: Create Release
id: create_release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v0.4.1
name: v0.4.1
files: |
/Users/runner/work/SCInsta/SCInsta/SCInsta/packages/*.ipa
/Users/runner/work/SCInsta/SCInsta/SCInsta/packages/*.deb
build:
name: Build SCInsta
runs-on: macos-latest
permissions:
contents: write

steps:
- name: Checkout Main
uses: actions/[email protected]
with:
path: main
submodules: recursive

- name: Install Dependencies
run: brew install ldid dpkg make

- name: Set PATH environment variable
run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH

- name: Setup Theos
uses: actions/[email protected]
with:
repository: theos/theos
ref: master
path: theos
submodules: recursive

- name: SDK Caching
id: SDK
uses: actions/[email protected]
env:
cache-name: iOS-14.5-SDK
with:
path: theos/sdks/
key: ${{ env.cache-name }}
restore-keys: ${{ env.cache-name }}

- name: Download iOS SDK
if: steps.SDK.outputs.cache-hit != 'true'
run: |
git clone --quiet -n --depth=1 --filter=tree:0 https://github.com/xybp888/iOS-SDKs/
cd iOS-SDKs
git sparse-checkout set --no-cone iPhoneOS14.5.sdk
git checkout
mv *.sdk $THEOS/sdks
env:
THEOS: ${{ github.workspace }}/theos
- name: Clone SCInsta Repo
run: |
git clone --recurse-submodules https://github.com/zeuikli/SCInsta
pwd
mkdir -p packages
- name: Prepare Instagram IPA
run: |
wget "$Instagram_URL" --no-verbose -O ${{ github.workspace }}/packages/com.burbn.instagram.ipa
env:
THEOS: ${{ github.workspace }}/theos
Instagram_URL: ${{ inputs.decrypted_instagram_url }}
- name: Build SCInsta tweak for sideloading (as IPA)
run: |
PROJECT_PATH=/Users/runner/work/SCInsta/SCInsta/SCInsta/
cd $PROJECT_PATH
bash -c "$(curl https://raw.githubusercontent.com/asdfzxcvbn/pyzule/main/install-pyzule.sh)"
ipaFile="/Users/runner/work/SCInsta/SCInsta/packages/com.burbn.instagram.ipa"
echo "IPA File: $ipaFile"
ls -l
./build.sh sideload
ls -l /Users/runner/work/SCInsta/SCInsta/SCInsta/packages
env:
THEOS: ${{ github.workspace }}/theos
- name: Upload Artifact
if: ${{ inputs.upload_artifact }}
uses: actions/[email protected]
with:
name: SCInsta_${{ github.run_number }}
path: /Users/runner/work/SCInsta/SCInsta/SCInsta/packages/SCInsta-sideloaded.ipa
if-no-files-found: error

0 comments on commit 3f42ff2

Please sign in to comment.