main.yml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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: AdityaGarg8/remove-unwanted-software@v5
  42. with:
  43. # remove-dotnet: 'true' # Frees ~2 GB
  44. # remove-android: 'true' # Frees ~9 GB
  45. # remove-haskell: 'true' # Frees ~5.2 GB
  46. # remove-codeql: 'true' # Frees ~5.4 GB
  47. # remove-docker-images: 'true' # Frees ~3.2 GB
  48. # remove-large-packages: 'true' # Frees ~3.1 GB
  49. remove-swapfile: 'true' # Frees ~4 GB
  50. # remove-cached-tools: 'false' # Avoid unless confirmed safe
  51. verbose: 'true' # Enable detailed logging
  52. - name: Checkout code
  53. uses: actions/checkout@v4
  54. - name: Get commit hashes and generate commit URLs
  55. run: |
  56. GITLAB_OWNER="simonpunk"
  57. GITLAB_REPO="susfs4ksu"
  58. declare -A BRANCH_MAP=(
  59. ["gki_android12_5_10"]="gki-android12-5.10"
  60. ["gki_android13_5_10"]="gki-android13-5.10"
  61. ["gki_android13_5_15"]="gki-android13-5.15"
  62. ["gki_android14_5_15"]="gki-android14-5.15"
  63. ["gki_android14_6_1"]="gki-android14-6.1"
  64. ["gki_android15_6_6"]="gki-android15-6.6"
  65. )
  66. for var_name in "${!BRANCH_MAP[@]}"; do
  67. branch_name="${BRANCH_MAP[$var_name]}"
  68. COMMIT_HASH=$(git ls-remote https://gitlab.com/$GITLAB_OWNER/$GITLAB_REPO.git refs/heads/$branch_name | awk '{ print $1 }')
  69. if [[ -n "$COMMIT_HASH" ]]; then
  70. COMMIT_URL="https://gitlab.com/$GITLAB_OWNER/$GITLAB_REPO/-/commit/$COMMIT_HASH"
  71. echo "$branch_name Commit: $COMMIT_HASH"
  72. echo "$branch_name Commit URL: $COMMIT_URL"
  73. echo "COMMIT_HASH_${var_name}=$COMMIT_HASH" >> "$GITHUB_ENV"
  74. echo "COMMIT_URL_${var_name}=$COMMIT_URL" >> "$GITHUB_ENV"
  75. fi
  76. done
  77. - name: Get KernelSU variant refs and links
  78. run: |
  79. # Get WKSU latest commit from wild branch
  80. WKSU_REF=$(git ls-remote "https://github.com/WildKernels/Wild_KSU.git" refs/heads/wild | awk '{print $1}')
  81. WKSU_URL="https://github.com/WildKernels/Wild_KSU/commit/$WKSU_REF"
  82. echo "WKSU_REF=$WKSU_REF" >> $GITHUB_ENV
  83. echo "WKSU_URL=$WKSU_URL" >> $GITHUB_ENV
  84. - name: Generate and Create New Tag
  85. run: |
  86. LATEST_TAG=$(gh api repos/${{ github.repository }}/tags --jq '.[0].name')
  87. if [ -z "$LATEST_TAG" ]; then
  88. LATEST_TAG="v1.5.11-r0"
  89. fi
  90. NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
  91. echo "New tag: $NEW_TAG"
  92. echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
  93. git tag $NEW_TAG
  94. git push origin $NEW_TAG
  95. - name: Download Artifacts
  96. uses: actions/download-artifact@v5
  97. with:
  98. path: ./downloaded-artifacts
  99. pattern: 'WKSU-*'
  100. - name: Set release body
  101. run: |
  102. cat << 'EOF' > release_body.md
  103. **IMPORTANT DISCLAIMER**
  104. This software is provided for testing and educational purposes only. Use at your own risk.
  105. The developers are not responsible for any damage, data loss, or issues that may occur.
  106. Please ensure you have proper backups before installation.
  107. NEW:
  108. -> **Symbol Fix Variant**: Normal build with additional symbol fixes for compatibility, if you encounter any issues with the normal build try this!
  109. Features:
  110. -> Wild KSU
  111. -> 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)
  112. -> SUSFS ඞ v1.5.11
  113. -> Scope-Minimized Manual hooks v1.4
  114. -> Magic Mount Support
  115. -> Ptrace Patch Support for Older Kernels (<5.16)
  116. -> IPSet Support for Advanced Network Filtering
  117. -> Wireguard Support
  118. -> BBR v1 Support
  119. -> Added BBG support to prevent unauthorised writes to certain partitions: https://github.com/vc-teahouse/Baseband-guard
  120. Notes:
  121. -> SUS SU Mode 2 will show as disabled or not compatble due to non-kprobe hooks and is not needed anymore!
  122. -> Official Kernel Flasher is broken with latest susfs, try https://github.com/fatalcoder524/KernelFlasher/
  123. -> **Warning**: boot.img files may not boot on some Android 16 devices
  124. Module:
  125. -> https://github.com/sidex15/ksu_module_susfs
  126. Managers:
  127. -> WKSU: https://t.me/Wild_Kernels/26618
  128. -> Next: https://github.com/KernelSU-Next/KernelSU-Next
  129. Commit Hashes (at the time of release):
  130. -> WKSU: [${{ env.WKSU_REF }}](${{ env.WKSU_URL }})
  131. -> SUSFS4KSU:
  132. -> gki-android12-5.10: [${{ env.COMMIT_HASH_gki_android12_5_10 }}](${{ env.COMMIT_URL_gki_android12_5_10 }})
  133. -> gki-android13-5.10: [${{ env.COMMIT_HASH_gki_android13_5_10 }}](${{ env.COMMIT_URL_gki_android13_5_10 }})
  134. -> gki-android13-5.15: [${{ env.COMMIT_HASH_gki_android13_5_15 }}](${{ env.COMMIT_URL_gki_android13_5_15 }})
  135. -> gki-android14-5.15: [${{ env.COMMIT_HASH_gki_android14_5_15 }}](${{ env.COMMIT_URL_gki_android14_5_15 }})
  136. -> gki-android14-6.1: [${{ env.COMMIT_HASH_gki_android14_6_1 }}](${{ env.COMMIT_URL_gki_android14_6_1 }})
  137. -> gki-android15-6.6: [${{ env.COMMIT_HASH_gki_android15_6_6 }}](${{ env.COMMIT_URL_gki_android15_6_6 }})
  138. EOF
  139. - name: Create GitHub Release
  140. uses: softprops/action-gh-release@v2
  141. with:
  142. tag_name: ${{ env.NEW_TAG }}
  143. prerelease: false
  144. files: ""
  145. name: ${{ env.RELEASE_NAME }}
  146. body_path: release_body.md
  147. - name: Upload Release Assets
  148. run: |
  149. for file in ./downloaded-artifacts/*/*; do
  150. if [ -d "$file" ]; then
  151. continue
  152. fi
  153. echo "Uploading $file..."
  154. gh release upload ${{ env.NEW_TAG }} "$file"
  155. done
  156. - name: Display Files Uploaded
  157. run: |
  158. echo "GitHub release created with the following files:"
  159. ls ./downloaded-artifacts/**/*
  160. - name: Send Telegram Notification
  161. run: |
  162. curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
  163. -F chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
  164. -F message_thread_id="${{ secrets.TELEGRAM_TOPIC_ID_GKI }}" \
  165. -F text="
  166. 🌽 *New Kernel Release Uploaded*
  167. 📦 *Repository:* [${{ github.repository }}](https://github.com/${{ github.repository }})
  168. ✏️ *Commit:* [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
  169. [🔗 View GitHub Release](https://github.com/${{ github.repository }}/releases/tag/${{ env.NEW_TAG }})" \
  170. -F parse_mode="Markdown"