CI #96
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| workflow_dispatch: | |
| inputs: | |
| create_release: | |
| description: "Build IPA and create draft release" | |
| default: false | |
| type: boolean | |
| build_modern_arm64e: | |
| description: "Build modern arm64e version (iOS 16+)" | |
| default: false | |
| type: boolean | |
| ipa_url: | |
| description: "Direct URL to Decrypted IPA file" | |
| type: string | |
| required: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Get package info | |
| id: package_info | |
| run: | | |
| version=$(cat Makefile | grep "PACKAGE_VERSION =" | cut -d' ' -f3) | |
| if [ -z $version ]; then | |
| version=$(cat control | grep "Version:" | cut -d' ' -f2) | |
| fi | |
| echo "id=$(cat control | grep "Package:" | cut -d' ' -f2)" >> $GITHUB_OUTPUT | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y rsync | |
| - name: Install theos-jailed dependencies | |
| if: ${{ inputs.create_release }} | |
| run: | | |
| sudo apt update | |
| sudo apt install -y build-essential checkinstall git autoconf automake libtool-bin llvm xmlstarlet | |
| curl -L https://github.com/libimobiledevice/libplist/releases/download/2.6.0/libplist-2.6.0.tar.bz2 | bzip2 -d | tar -x | |
| cd libplist* | |
| ./configure | |
| sudo make install | |
| sudo ldconfig | |
| - name: Download IPA (Auto) | |
| if: ${{ inputs.create_release && !inputs.ipa_url }} | |
| uses: level3tjg/decryptedappstore-action@main | |
| with: | |
| appstore_url: "https://apps.apple.com/us/app/reddit/id1064216828" | |
| cache: true | |
| path: ${{ github.workspace }}/App.ipa | |
| token: ${{ secrets.DECRYPTEDAPPSTORE_SESSION_TOKEN }} | |
| - name: Download IPA (Manual) | |
| if: ${{ inputs.create_release && inputs.ipa_url }} | |
| run: | | |
| curl -Lo "${{ github.workspace }}/App.ipa" "${{ inputs.ipa_url }}" | |
| zip -T "${{ github.workspace }}/App.ipa" | |
| - name: Get IPA Info | |
| if: ${{ inputs.create_release }} | |
| id: ipa_info | |
| run: | | |
| info=$(unzip -p "${{ github.workspace }}/App.ipa" Payload/*.app/Info.plist) | |
| echo "bundle-id=$(echo $info | xmlstarlet sel -t -v "/plist/dict/key[text()=\"CFBundleIdentifier\"]/following-sibling::*[1]/text()")" >> $GITHUB_OUTPUT | |
| echo "version=$(echo $info | xmlstarlet sel -t -v "/plist/dict/key[text()=\"CFBundleShortVersionString\"]/following-sibling::*[1]/text()")" >> $GITHUB_OUTPUT | |
| - name: Setup theos | |
| uses: level3tjg/theos-action@main | |
| with: | |
| cache: true | |
| cache-dir-theos: ${{ github.workspace }}/theos | |
| cache-dir-sdks: ${{ github.workspace }}/theos/sdks | |
| - name: Checkout theos-jailed | |
| if: ${{ inputs.create_release }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: level3tjg/theos-jailed | |
| path: theos-jailed | |
| submodules: recursive | |
| - name: Install theos-jailed | |
| if: ${{ inputs.create_release }} | |
| run: | | |
| ./theos-jailed/install | |
| - name: Build rootless deb (iOS 11 arm64) | |
| run: make package | |
| env: | |
| FINALPACKAGE: ${{ inputs.create_release && '1' || '0' }} | |
| THEOS_PACKAGE_SCHEME: rootless | |
| - name: Build rootful deb (iOS 11 arm64) | |
| run: make clean package | |
| env: | |
| FINALPACKAGE: ${{ inputs.create_release && '1' || '0' }} | |
| - name: Build rootless deb (iOS 16 arm64e) | |
| if: ${{ inputs.build_modern_arm64e == true }} | |
| run: make clean package | |
| env: | |
| FINALPACKAGE: ${{ inputs.create_release && '1' || '0' }} | |
| THEOS_PACKAGE_SCHEME: rootless | |
| MODERN_ARM64E: 1 | |
| - name: Build IPA | |
| if: ${{ inputs.create_release }} | |
| run: make clean package | |
| env: | |
| FINALPACKAGE: 1 | |
| SIDELOADED: 1 | |
| MODERN_ARM64E: ${{ inputs.build_modern_arm64e == true && '1' || '0' }} | |
| IPA: ${{ github.workspace }}/App.ipa | |
| # Appends -arm64e to the output IPA filename if the box is checked | |
| APP_VERSION: ${{ steps.ipa_info.outputs.version }}${{ inputs.build_modern_arm64e == true && '-arm64e' || '' }} | |
| - name: Hash release files | |
| id: hash_files | |
| run: | | |
| echo 'hashes<<EOF' >> $GITHUB_OUTPUT | |
| echo "$(sha256sum packages/*)" >> $GITHUB_OUTPUT | |
| echo 'EOF' >> $GITHUB_OUTPUT | |
| - name: Upload DEB Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Jailbreak_DEBs | |
| path: packages/*.deb | |
| - name: Upload IPA Artifact | |
| if: ${{ inputs.create_release }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Sideloaded_IPA | |
| path: packages/*.ipa | |
| - name: Create release | |
| if: ${{ inputs.create_release }} | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| files: packages/* | |
| tag_name: v${{ steps.ipa_info.outputs.version }}-${{ steps.package_info.outputs.version }} | |
| body: ${{ steps.hash_files.outputs.hashes }} |