Add files via upload #1493
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: Compile & Release Tweak | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-modern: | |
| runs-on: macos-14 | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| outputs: | |
| version: ${{ steps.get_version.outputs.VERSION }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Theos | |
| uses: Randomblock1/theos-action@v1 | |
| with: | |
| theos-sdks: 'https://github.com/theos/sdks' | |
| - name: Download iPhoneOS16.5.sdk | |
| run: | | |
| mkdir -p $THEOS/sdks | |
| curl -LO https://github.com/theos/sdks/releases/latest/download/iPhoneOS16.5.sdk.tar.xz | |
| tar -xf iPhoneOS16.5.sdk.tar.xz -C $THEOS/sdks/ | |
| rm *.tar.xz | |
| - name: Fix Script Permissions | |
| run: | | |
| chmod +x layout/DEBIAN/prerm || true | |
| chmod +x layout/DEBIAN/postinst || true | |
| - name: Extract Tweak Version | |
| id: get_version | |
| run: | | |
| VERSION=$(grep -i '^Version:' control | awk '{print $2}') | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Prepare Output Directory | |
| run: mkdir -p output | |
| - name: Build Modern Targets (iOS 15+) | |
| run: | | |
| rm -rf vendor/AltList.framework | |
| cp -R vendor/AltList_New.framework vendor/AltList.framework | |
| make clean | |
| make package FINALPACKAGE=1 SYSROOT=$THEOS/sdks/iPhoneOS16.5.sdk TARGET="iphone:clang:16.5:15.0" ARCHS="arm64 arm64e" | |
| mv packages/*.deb output/com.eolnmsuk.antidarksword_${{ env.VERSION }}_iphoneos-arm.deb | |
| make clean | |
| make package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless SYSROOT=$THEOS/sdks/iPhoneOS16.5.sdk TARGET="iphone:clang:16.5:15.0" ARCHS="arm64 arm64e" | |
| mv packages/*.deb output/com.eolnmsuk.antidarksword_${{ env.VERSION }}_iphoneos-arm64.deb | |
| cd AntiDarkSwordTF | |
| make clean | |
| make FINALPACKAGE=1 SYSROOT=$THEOS/sdks/iPhoneOS16.5.sdk TARGET="iphone:clang:16.5:15.0" ARCHS="arm64 arm64e" | |
| DYLIB=$(find .theos/obj -name "AntiDarkSword*.dylib" | head -1) | |
| cp "$DYLIB" "../output/AntiDarkSword_${{ env.VERSION }}_TrollFools.dylib" | |
| - name: Upload Modern Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: AntiDarkSword-Modern | |
| path: output/* | |
| build-legacy: | |
| runs-on: macos-14 | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| outputs: | |
| version: ${{ steps.get_version.outputs.VERSION }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Theos | |
| uses: Randomblock1/theos-action@v1 | |
| with: | |
| theos-sdks: 'https://github.com/theos/sdks' | |
| - name: Download iPhoneOS14.5.sdk | |
| run: | | |
| mkdir -p $THEOS/sdks | |
| curl -LO https://github.com/theos/sdks/releases/latest/download/iPhoneOS14.5.sdk.tar.xz | |
| tar -xf iPhoneOS14.5.sdk.tar.xz -C $THEOS/sdks/ | |
| rm *.tar.xz | |
| - name: Fix Script Permissions | |
| run: | | |
| chmod +x layout/DEBIAN/prerm || true | |
| chmod +x layout/DEBIAN/postinst || true | |
| - name: Extract Tweak Version | |
| id: get_version | |
| run: | | |
| VERSION=$(grep -i '^Version:' control | awk '{print $2}') | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Prepare Output Directory | |
| run: mkdir -p output | |
| - name: Build Legacy Target (iOS 13–14) | |
| run: | | |
| rm -rf vendor/AltList.framework | |
| cp -R vendor/AltList_Old.framework vendor/AltList.framework | |
| lipo -thin arm64 vendor/AltList.framework/AltList -output vendor/AltList.framework/AltList | |
| make clean | |
| make package FINALPACKAGE=1 SYSROOT=$THEOS/sdks/iPhoneOS14.5.sdk TARGET="iphone:clang:14.5:13.0" ARCHS="arm64" | |
| mv packages/*.deb output/com.eolnmsuk.antidarksword_${{ env.VERSION }}_iphoneos-arm_legacy.deb | |
| - name: Upload Legacy Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: AntiDarkSword-Legacy | |
| path: output/* | |
| release: | |
| needs: [build-modern, build-legacy] | |
| runs-on: macos-14 | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| VERSION: ${{ needs.build-modern.outputs.version }} | |
| steps: | |
| - name: Download Modern Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: AntiDarkSword-Modern | |
| path: output/ | |
| - name: Download Legacy Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: AntiDarkSword-Legacy | |
| path: output/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ env.VERSION }}-b${{ github.run_number }} | |
| name: "AntiDarkSword v${{ env.VERSION }}" | |
| files: output/* | |
| draft: true | |
| body: | | |
| Automated builds of AntiDarkSword v${{ env.VERSION }}. | |
| ### Compatibility Guide | |
| | File | For | | |
| |---|---| | |
| | `*_iphoneos-arm64.deb` | iOS 15+ Rootless (all models) | | |
| | `*_iphoneos-arm.deb` | iOS 15+ Rootful (all models) | | |
| | `*_iphoneos-arm_legacy.deb` | iOS 13–14 Rootful (A9 - A11) | | |
| | `*_TrollFools.dylib` | iOS 15+ TrollStore / TrollFools (all models) | |