From 3f42ff2eff801a6155f40db3630d1450d3dc7b6a Mon Sep 17 00:00:00 2001 From: SoCuul <63339559+SoCuul@users.noreply.github.com> Date: Sun, 22 Sep 2024 22:48:47 -0700 Subject: [PATCH] build: update actions build script --- .github/workflows/buildapp.yml | 258 +++++++++++++++------------------ 1 file changed, 113 insertions(+), 145 deletions(-) diff --git a/.github/workflows/buildapp.yml b/.github/workflows/buildapp.yml index c5513df..59ca559 100644 --- a/.github/workflows/buildapp.yml +++ b/.github/workflows/buildapp.yml @@ -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/checkout@v4.1.1 - 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/checkout@v4.1.1 - with: - repository: theos/theos - ref: master - path: theos - submodules: recursive - - - name: SDK Caching - id: SDK - uses: actions/cache@v4.0.2 - 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/checkout@v4.1.1 - 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/upload-artifact@v4.3.1 - 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/action-gh-release@v2.0.4 - 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/checkout@v4.1.1 + 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/checkout@v4.1.1 + with: + repository: theos/theos + ref: master + path: theos + submodules: recursive + + - name: SDK Caching + id: SDK + uses: actions/cache@v4.0.2 + 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/upload-artifact@v4.3.1 + with: + name: SCInsta_${{ github.run_number }} + path: /Users/runner/work/SCInsta/SCInsta/SCInsta/packages/SCInsta-sideloaded.ipa + if-no-files-found: error \ No newline at end of file