main.yml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. name: Build Kernels
  2. permissions:
  3. contents: write
  4. actions: write
  5. on:
  6. workflow_dispatch:
  7. inputs:
  8. release_type:
  9. description: "Choose Release Type"
  10. required: true
  11. type: choice
  12. options:
  13. - Actions
  14. - Pre-Release
  15. - Release
  16. default: Actions
  17. jobs:
  18. build-samsung:
  19. uses: ./.github/workflows/kernel-samsung.yml
  20. secrets: inherit
  21. release:
  22. runs-on: ubuntu-latest
  23. if: inputs.release_type != 'Actions'
  24. needs:
  25. - build-samsung
  26. env:
  27. GH_TOKEN: ${{ github.token }}
  28. RELEASE_NAME: "Samsung GKI Kernels With WKSU v3.0.0 & SUSFS v2.0.0"
  29. RELEASE_BODY: ""
  30. steps:
  31. - name: Download Apache Arrow's util_free_space.sh
  32. run: |
  33. curl -L -o util_free_space.sh https://raw.githubusercontent.com/apache/arrow/main/ci/scripts/util_free_space.sh
  34. chmod +x util_free_space.sh
  35. ./util_free_space.sh
  36. - name: Checkout code
  37. uses: actions/checkout@v4
  38. - name: Generate New Tag
  39. if: inputs.release_type != 'Actions'
  40. run: |
  41. LATEST_TAG=$(gh api repos/${{ github.repository }}/tags --jq '.[0].name' 2>/dev/null || echo "")
  42. if [ -z "$LATEST_TAG" ]; then
  43. LATEST_TAG="v1.5.12-r0"
  44. fi
  45. NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
  46. echo "New tag: $NEW_TAG"
  47. echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
  48. - name: Download Artifacts
  49. uses: actions/download-artifact@v5
  50. with:
  51. path: ./downloaded-artifacts
  52. pattern: '*-AnyKernel3'
  53. - name: Set release body
  54. run: |
  55. cat << 'EOF' > release_body.md
  56. **IMPORTANT DISCLAIMER**
  57. This software is provided for testing and educational purposes only. Use at your own risk.
  58. The developers are not responsible for any damage, data loss, or issues that may occur.
  59. Please ensure you have proper backups before installation.
  60. Features:
  61. -> Wild KSU
  62. -> Multi Manager Support for WKSU, KernelSU-Next! Needs Testing: KSU, MKSU RKSU, xxKSU, KowSU and SukiSU (Best compatibility with WKSU, no support will be provided for other managers)
  63. -> SUSFS ඞ v1.5.12
  64. -> Scope-Minimized Manual hooks v1.4
  65. -> Ptrace Patch Support for Older Kernels (<5.16)
  66. -> IPSet Support for Advanced Network Filtering
  67. -> Wireguard Support
  68. -> BBR v1 Support
  69. -> Kernel Sound System: Basic audio support with PCM, timers, procfs info, dynamic devices, and loopback module (module found at /data/adb/lkm after install)
  70. -> Added BBG support to prevent unauthorised writes to certain partitions: https://github.com/vc-teahouse/Baseband-guard
  71. 🔹 BBG (Baseband-guard)
  72. - A lightweight LSM (Linux Security Module) for Android kernel
  73. - Blocks unauthorized writes to critical partitions/device nodes
  74. - Prevents malicious tampering with baseband and boot chain
  75. - Kernel-level protection via LSM hooks
  76. - Reduces risk of soft-brick/hard-brick issues
  77. Notes:
  78. -> SUS SU Mode 2 will show as disabled or not compatible due to non-kprobe hooks and is not needed anymore!
  79. -> Official Kernel Flasher is broken with latest susfs, try https://github.com/fatalcoder524/KernelFlasher/
  80. -> **boot.img files**: Available as CI artifacts only - download from the Actions tab in the "Misc" Artifact
  81. -> **Warning**: boot.img files may not boot on some devices
  82. -> **Note:** For detailed commit information and component versions, please check the build summary in the "Misc" Artifact
  83. Module:
  84. -> https://github.com/sidex15/ksu_module_susfs
  85. Managers:
  86. -> WKSU: https://github.com/WildKernels/Wild_KSU
  87. -> Next: https://github.com/KernelSU-Next/KernelSU-Next
  88. EOF
  89. - name: Create GitHub Release
  90. uses: softprops/action-gh-release@v2
  91. with:
  92. tag_name: ${{ env.NEW_TAG }}
  93. prerelease: ${{ inputs.release_type == 'Pre-Release' }}
  94. files: ""
  95. name: ${{ env.RELEASE_NAME }}
  96. body_path: release_body.md
  97. - name: Upload Release Assets
  98. run: |
  99. shopt -s nullglob
  100. anykernel_dirs=(./downloaded-artifacts/*/)
  101. if [ ${#anykernel_dirs[@]} -eq 0 ]; then
  102. echo "No artifact directories found under ./downloaded-artifacts; skipping upload."
  103. else
  104. for dir in "${anykernel_dirs[@]}"; do
  105. # Check if this is an AnyKernel3 artifact directory
  106. if [[ "$(basename "$dir")" == *"-AnyKernel3" ]]; then
  107. artifact_name=$(basename "$dir")
  108. echo "Creating ZIP for $artifact_name..."
  109. # Navigate into the directory and zip its contents directly
  110. cd "$dir"
  111. zip -r -9 "../../${artifact_name}.zip" ./*
  112. cd - > /dev/null
  113. echo "Uploading ${artifact_name}.zip..."
  114. gh release upload ${{ env.NEW_TAG }} "${artifact_name}.zip"
  115. fi
  116. done
  117. fi
  118. # - name: Send Telegram Notification
  119. # if: inputs.release_type != 'Actions'
  120. # run: |
  121. # RELEASE_TYPE_TEXT=""
  122. # if [ "${{ inputs.release_type }}" == "Pre-Release" ]; then
  123. # RELEASE_TYPE_TEXT="🧪 *Pre-Release*"
  124. # else
  125. # RELEASE_TYPE_TEXT="🚀 *Release*"
  126. # fi
  127. #
  128. # curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
  129. # -F chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
  130. # -F message_thread_id="${{ secrets.TELEGRAM_TOPIC_ID_GKI }}" \
  131. # -F text="
  132. # 🌽 *New Kernel $RELEASE_TYPE_TEXT Uploaded*
  133. # 📦 *Repository:* [${{ github.repository }}](https://github.com/${{ github.repository }})
  134. # ✏️ *Commit:* [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
  135. # [🔗 View GitHub Release](https://github.com/${{ github.repository }}/releases/tag/${{ env.NEW_TAG }})" \
  136. # -F parse_mode="Markdown"