|
| 1 | +name: Build Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - "v*.*.*" |
| 7 | + |
| 8 | +env: |
| 9 | + THEOS: '' |
| 10 | + GIT_TAG: '' |
| 11 | + XCODE_VERSION: '14.3.1' |
| 12 | + |
| 13 | +jobs: |
| 14 | + build: |
| 15 | + name: Build and upload release package for TrollStore |
| 16 | + runs-on: macos-13 |
| 17 | + |
| 18 | + steps: |
| 19 | + - name: Setup Xcode version |
| 20 | + uses: maxim-lobanov/setup-xcode@v1 |
| 21 | + with: |
| 22 | + xcode-version: ${{ env.XCODE_VERSION }} |
| 23 | + |
| 24 | + - name: Install Homebrew Dependencies |
| 25 | + run: | |
| 26 | + brew install dpkg ldid make libplist openssl@3 |
| 27 | + echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH |
| 28 | +
|
| 29 | + - name: Checkout XXTouchNG/theos |
| 30 | + uses: actions/checkout@v3 |
| 31 | + with: |
| 32 | + repository: XXTouchNG/theos |
| 33 | + ref: 78ee784d8d3238982c9abdc58cd39919263648b1 |
| 34 | + path: theos |
| 35 | + submodules: recursive |
| 36 | + |
| 37 | + - name: Add THEOS Environment Variables |
| 38 | + run: | |
| 39 | + rm -rf $GITHUB_WORKSPACE/theos/sdks |
| 40 | + echo "THEOS=$GITHUB_WORKSPACE/theos" >> $GITHUB_ENV |
| 41 | +
|
| 42 | + - name: Restore Additional SDKs |
| 43 | + id: cached-sdks-restore |
| 44 | + uses: actions/cache/restore@v3 |
| 45 | + with: |
| 46 | + path: ${{ env.THEOS }}/sdks |
| 47 | + key: ${{ runner.os }}-sdks-${{ env.XCODE_VERSION }} |
| 48 | + |
| 49 | + - if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }} |
| 50 | + name: Checkout theos/sdks |
| 51 | + uses: actions/checkout@v3 |
| 52 | + with: |
| 53 | + repository: theos/sdks |
| 54 | + ref: master |
| 55 | + path: ${{ env.THEOS }}/sdks |
| 56 | + |
| 57 | + - if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }} |
| 58 | + name: Checkout XXTouchNG/tbd |
| 59 | + uses: actions/checkout@v3 |
| 60 | + with: |
| 61 | + repository: XXTouchNG/tbd |
| 62 | + ref: 30a6883092221e13d814c02ac41af1e565a40617 |
| 63 | + path: tbd |
| 64 | + |
| 65 | + - if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }} |
| 66 | + name: Build tbd |
| 67 | + run: | |
| 68 | + cd $GITHUB_WORKSPACE/tbd |
| 69 | + make |
| 70 | + cp bin/tbd /usr/local/bin/tbd |
| 71 | +
|
| 72 | + - if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }} |
| 73 | + name: Generate Additional SDKs |
| 74 | + run: | |
| 75 | + cd $THEOS/sdks |
| 76 | + python3 create_patched_sdk.py --no-overwrite -x $(dirname $(dirname $(xcode-select -p))) |
| 77 | +
|
| 78 | + - if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }} |
| 79 | + name: Save Additional SDKs |
| 80 | + id: cached-sdks-save |
| 81 | + uses: actions/cache/save@v3 |
| 82 | + with: |
| 83 | + path: ${{ env.THEOS }}/sdks |
| 84 | + key: ${{ steps.cached-sdks-restore.outputs.cache-primary-key }} |
| 85 | + |
| 86 | + - name: Checkout |
| 87 | + uses: actions/checkout@v3 |
| 88 | + with: |
| 89 | + repository: Lessica/TrollSpeed |
| 90 | + ref: main |
| 91 | + path: TrollSpeed |
| 92 | + submodules: recursive |
| 93 | + |
| 94 | + - name: Setup Build Environment |
| 95 | + run: | |
| 96 | + echo "Available SDKs: $(find $THEOS/sdks -name "*.sdk" -maxdepth 1 -print)" |
| 97 | + echo "FINALPACKAGE=1" >> $GITHUB_ENV |
| 98 | + cd $GITHUB_WORKSPACE/TrollSpeed |
| 99 | + git fetch --tags |
| 100 | + echo "GIT_TAG=$(git describe --tags --always --abbrev=0)" >> $GITHUB_ENV |
| 101 | +
|
| 102 | + - name: Build Package |
| 103 | + run: | |
| 104 | + cd $GITHUB_WORKSPACE/TrollSpeed |
| 105 | + ./gen-control.sh ${{ env.GIT_TAG }} |
| 106 | + FINALPACKAGE=1 make stage |
| 107 | +
|
| 108 | + - name: Collect Symbols |
| 109 | + run: | |
| 110 | + cd $GITHUB_WORKSPACE/TrollSpeed |
| 111 | + find .theos/obj -name "*.dSYM" -print | zip -r packages/TrollSpeed_${{ env.GIT_TAG }}_symbols.zip -@ |
| 112 | +
|
| 113 | + - name: Upload Artifacts |
| 114 | + uses: actions/upload-artifact@v3 |
| 115 | + with: |
| 116 | + name: TrollSpeed_${{ env.GIT_TAG }} |
| 117 | + path: | |
| 118 | + TrollSpeed/packages/TrollSpeed_*.tipa |
| 119 | +
|
| 120 | + - name: Upload Symbols |
| 121 | + uses: actions/upload-artifact@v3 |
| 122 | + with: |
| 123 | + name: TrollSpeed_${{ env.GIT_TAG }}_symbols |
| 124 | + path: | |
| 125 | + TrollSpeed/packages/TrollSpeed_${{ env.GIT_TAG }}_symbols.zip |
| 126 | +
|
| 127 | + - name: Upload Release |
| 128 | + uses: softprops/action-gh-release@v1 |
| 129 | + with: |
| 130 | + token: ${{ secrets.RELEASE_GITHUB_TOKEN }} |
| 131 | + body_path: TrollSpeed/CHANGELOG.txt |
| 132 | + files: | |
| 133 | + TrollSpeed/packages/TrollSpeed_*.tipa |
0 commit comments