main.yml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. name: Build Kernels
  2. permissions:
  3. contents: write
  4. actions: write
  5. on:
  6. workflow_dispatch:
  7. jobs:
  8. build-a12-5-10:
  9. uses: ./.github/workflows/kernel-a12-5-10.yml
  10. secrets: inherit
  11. build-a13-5-10:
  12. uses: ./.github/workflows/kernel-a13-5-10.yml
  13. secrets: inherit
  14. build-a13-5-15:
  15. uses: ./.github/workflows/kernel-a13-5-15.yml
  16. secrets: inherit
  17. build-a14-5-15:
  18. uses: ./.github/workflows/kernel-a14-5-15.yml
  19. secrets: inherit
  20. build-a14-6-1:
  21. uses: ./.github/workflows/kernel-a14-6-1.yml
  22. secrets: inherit
  23. build-a15-6-6:
  24. uses: ./.github/workflows/kernel-a15-6-6.yml
  25. secrets: inherit
  26. release:
  27. runs-on: ubuntu-latest
  28. needs:
  29. - build-a12-5-10
  30. - build-a13-5-10
  31. - build-a13-5-15
  32. - build-a14-5-15
  33. - build-a14-6-1
  34. - build-a15-6-6
  35. env:
  36. GH_TOKEN: ${{ github.token }}
  37. RELEASE_NAME: "!!TESTING!! GKI Kernels With WKSU & SUSFS v1.5.11 !!!TESTING!!!"
  38. RELEASE_BODY:
  39. steps:
  40. - name: Maximize build space
  41. uses: easimon/maximize-build-space@master
  42. with:
  43. root-reserve-mb: 8192
  44. temp-reserve-mb: 2048
  45. remove-dotnet: 'true'
  46. remove-android: 'true'
  47. remove-haskell: 'true'
  48. remove-codeql: 'true'
  49. - name: Checkout code
  50. uses: actions/checkout@v4
  51. - name: Get commit hashes and generate commit URLs
  52. run: |
  53. GITLAB_OWNER="simonpunk"
  54. GITLAB_REPO="susfs4ksu"
  55. declare -A BRANCH_MAP=(
  56. ["gki_android12_5_10"]="gki-android12-5.10"
  57. ["gki_android13_5_10"]="gki-android13-5.10"
  58. ["gki_android13_5_15"]="gki-android13-5.15"
  59. ["gki_android14_5_15"]="gki-android14-5.15"
  60. ["gki_android14_6_1"]="gki-android14-6.1"
  61. ["gki_android15_6_6"]="gki-android15-6.6"
  62. )
  63. for var_name in "${!BRANCH_MAP[@]}"; do
  64. branch_name="${BRANCH_MAP[$var_name]}"
  65. COMMIT_HASH=$(git ls-remote https://gitlab.com/$GITLAB_OWNER/$GITLAB_REPO.git refs/heads/$branch_name | awk '{ print $1 }')
  66. if [[ -n "$COMMIT_HASH" ]]; then
  67. COMMIT_URL="https://gitlab.com/$GITLAB_OWNER/$GITLAB_REPO/-/commit/$COMMIT_HASH"
  68. echo "$branch_name Commit: $COMMIT_HASH"
  69. echo "$branch_name Commit URL: $COMMIT_URL"
  70. echo "COMMIT_HASH_${var_name}=$COMMIT_HASH" >> "$GITHUB_ENV"
  71. echo "COMMIT_URL_${var_name}=$COMMIT_URL" >> "$GITHUB_ENV"
  72. fi
  73. done
  74. - name: Get KernelSU variant refs and links
  75. run: |
  76. # Get WKSU latest commit from wild branch
  77. WKSU_REF=$(git ls-remote "https://github.com/WildKernels/Wild_KSU.git" refs/heads/wild | awk '{print $1}')
  78. WKSU_URL="https://github.com/WildKernels/Wild_KSU/commit/$WKSU_REF"
  79. echo "WKSU_REF=$WKSU_REF" >> $GITHUB_ENV
  80. echo "WKSU_URL=$WKSU_URL" >> $GITHUB_ENV
  81. - name: Generate and Create New Tag
  82. run: |
  83. LATEST_TAG=$(gh api repos/${{ github.repository }}/tags --jq '.[0].name')
  84. if [ -z "$LATEST_TAG" ]; then
  85. LATEST_TAG="v1.5.11-r0"
  86. fi
  87. NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
  88. echo "New tag: $NEW_TAG"
  89. echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
  90. git tag $NEW_TAG
  91. git push origin $NEW_TAG
  92. - name: Download Artifacts
  93. uses: actions/download-artifact@v5
  94. with:
  95. path: ./downloaded-artifacts
  96. pattern: 'WKSU-*-AnyKernel3'
  97. - name: Set release body
  98. run: |
  99. cat << 'EOF' > release_body.md
  100. **IMPORTANT DISCLAIMER**
  101. This software is provided for testing and educational purposes only. Use at your own risk.
  102. The developers are not responsible for any damage, data loss, or issues that may occur.
  103. Please ensure you have proper backups before installation.
  104. NEW:
  105. -> **Symbol Fix Variant**: Normal build with additional hack for compatibility, if you encounter any issues with the normal build try this!
  106. Features:
  107. -> Wild KSU
  108. -> Multi Manager Support for WKSU, KernelSU-Next, KSU, MKSU! Needs Testing: RKSU, xxKSU, KowSU and SukiSU (Best compatibility with WKSU, no support will be provided for other managers)
  109. -> SUSFS ඞ v1.5.11
  110. -> Scope-Minimized Manual hooks v1.4
  111. -> Magic Mount Support
  112. -> Ptrace Patch Support for Older Kernels (<5.16)
  113. -> IPSet Support for Advanced Network Filtering
  114. -> Wireguard Support
  115. -> BBR v1 Support
  116. -> Added BBG support to prevent unauthorised writes to certain partitions: https://github.com/vc-teahouse/Baseband-guard
  117. Notes:
  118. -> SUS SU Mode 2 will show as disabled or not compatble due to non-kprobe hooks and is not needed anymore!
  119. -> Official Kernel Flasher is broken with latest susfs, try https://github.com/fatalcoder524/KernelFlasher/
  120. -> **boot.img files**: Available as CI artifacts only (not included in releases) - download from the Actions tab
  121. -> **Warning**: boot.img files may not boot on some Android 16 devices
  122. Module:
  123. -> https://github.com/sidex15/ksu_module_susfs
  124. Managers:
  125. -> WKSU: https://t.me/Wild_Kernels/26618
  126. -> Next: https://github.com/KernelSU-Next/KernelSU-Next
  127. Commit Hashes (at the time of release):
  128. -> WKSU: [${{ env.WKSU_REF }}](${{ env.WKSU_URL }})
  129. -> SUSFS4KSU:
  130. -> gki-android12-5.10: [${{ env.COMMIT_HASH_gki_android12_5_10 }}](${{ env.COMMIT_URL_gki_android12_5_10 }})
  131. -> gki-android13-5.10: [${{ env.COMMIT_HASH_gki_android13_5_10 }}](${{ env.COMMIT_URL_gki_android13_5_10 }})
  132. -> gki-android13-5.15: [${{ env.COMMIT_HASH_gki_android13_5_15 }}](${{ env.COMMIT_URL_gki_android13_5_15 }})
  133. -> gki-android14-5.15: [${{ env.COMMIT_HASH_gki_android14_5_15 }}](${{ env.COMMIT_URL_gki_android14_5_15 }})
  134. -> gki-android14-6.1: [${{ env.COMMIT_HASH_gki_android14_6_1 }}](${{ env.COMMIT_URL_gki_android14_6_1 }})
  135. -> gki-android15-6.6: [${{ env.COMMIT_HASH_gki_android15_6_6 }}](${{ env.COMMIT_URL_gki_android15_6_6 }})
  136. EOF
  137. - name: Create GitHub Release
  138. uses: softprops/action-gh-release@v2
  139. with:
  140. tag_name: ${{ env.NEW_TAG }}
  141. prerelease: false
  142. files: ""
  143. name: ${{ env.RELEASE_NAME }}
  144. body_path: release_body.md
  145. - name: Upload Release Assets
  146. run: |
  147. for file in ./downloaded-artifacts/*/*; do
  148. if [ -d "$file" ]; then
  149. continue
  150. fi
  151. echo "Uploading $file..."
  152. gh release upload ${{ env.NEW_TAG }} "$file"
  153. done
  154. - name: Display Files Uploaded
  155. run: |
  156. echo "GitHub release created with the following files:"
  157. ls ./downloaded-artifacts/**/*
  158. - name: Send Telegram Notification
  159. run: |
  160. curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
  161. -F chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
  162. -F message_thread_id="${{ secrets.TELEGRAM_TOPIC_ID_GKI }}" \
  163. -F text="
  164. 🌽 *New Kernel Release Uploaded*
  165. 📦 *Repository:* [${{ github.repository }}](https://github.com/${{ github.repository }})
  166. ✏️ *Commit:* [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
  167. [🔗 View GitHub Release](https://github.com/${{ github.repository }}/releases/tag/${{ env.NEW_TAG }})" \
  168. -F parse_mode="Markdown"