main.yml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  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. lto:
  18. description: "Choose LTO build"
  19. required: true
  20. type: choice
  21. options:
  22. - default
  23. - thin
  24. - full
  25. default: default
  26. commit_mode:
  27. description: "latest = branch tips, verified = audited pins, update = build latest then promote verified pins on success"
  28. required: false
  29. type: choice
  30. options:
  31. - latest
  32. - verified
  33. - update
  34. default: verified
  35. root_flavor:
  36. description: "Root Flavor"
  37. type: choice
  38. options:
  39. - KernelSU-Next
  40. - KernelSU
  41. - ReSukiSU
  42. - All
  43. default: All
  44. device:
  45. description: "Device branch (All = all devices)"
  46. type: choice
  47. options:
  48. - All
  49. - SM-S938B-Oneui8.5
  50. - SM-S938B-Oneui7
  51. - SM-S931B-Oneui8.5
  52. - SM-S931B-Oneui8
  53. - SM-A055M-Oneui7
  54. - SM-A055F-Oneui7
  55. - SM-S928B-Oneui8.5
  56. - SM-S928B-Oneui8-bit4
  57. - SM-S928B-Oneui8-bit5
  58. - SM-S928B-Oneui7
  59. - SM-S928B-Oneui6.1
  60. - SM-A556B-Oneui7-bitA
  61. - SM-A556E-Oneui7-bitA
  62. - SM-S926B-Oneui8.5
  63. - SM-S926B-Oneui8
  64. - SM-S926B-Oneui7-bit7
  65. - SM-S926B-Oneui7-bit8
  66. - SM-S926B-Oneui7-bit9
  67. - SM-X926B-Oneui6.1
  68. - SM-F741B-Oneui8
  69. - SM-F731B-Oneui6
  70. - SM-F731B-Oneui7
  71. - SM-F731B-Oneui8
  72. - SM-F731B-Oneui8.5
  73. - SM-A546B-Oneui7
  74. - SM-A546B-Oneui8
  75. - SM-A546B-Oneui6.0
  76. - SM-A546E-Oneui7
  77. - SM-A546E-Oneui8
  78. - SM-A166B-Oneui7
  79. - SM-A057M-Oneui7
  80. - SM-X710-Oneui6.1.1
  81. - SM-X916B
  82. - SM-F946N-Oneui7
  83. - SM-F946B-Oneui8
  84. - SM-S916B-Oneui8
  85. - SM-S918B-Oneui8
  86. - SM-S918B-Oneui8.5
  87. - SM-S9180-Oneui6.1
  88. - SM-S918B-Oneui7
  89. - SM-M146B-Oneui7-ADYJ2
  90. - SM-S911B-Oneui8.5
  91. - SM-S911B-Oneui8-bit8
  92. - SM-S911B-Oneui8
  93. - SM-S911B-Oneui7
  94. - SM-S911B-Oneui6.1-bit7
  95. - SM-S911B-Oneui6.1-bit8
  96. - SM-X610-Oneui6.1.1-bit7
  97. - SM-X800-Oneui8
  98. - SM-S908E-Oneui8
  99. - SM-S901E-Oneui8
  100. - SM-M556B-Oneui8
  101. - SM-S908B-Oneui8-bitK
  102. - SM-A075M-Oneui7
  103. - SM-S906E-Oneui8
  104. - SM-X610-Oneui7
  105. - SM-A356E-Oneui8
  106. - SM-A356E-Oneui8.5
  107. - SM-S711B-Oneui8.5
  108. default: All
  109. susfs:
  110. description: "SUSFS"
  111. required: false
  112. type: boolean
  113. default: true
  114. zeromount:
  115. description: "Zeromount"
  116. required: false
  117. type: boolean
  118. default: false
  119. nomount:
  120. description: "NoMount"
  121. required: false
  122. type: boolean
  123. default: true
  124. bbg:
  125. description: "BBG"
  126. required: false
  127. type: boolean
  128. default: true
  129. unicodefix:
  130. description: "Unicode fix"
  131. required: false
  132. type: boolean
  133. default: true
  134. droidspace:
  135. description: "Droidspaces"
  136. required: false
  137. type: boolean
  138. default: true
  139. ntsync:
  140. description: "NTsync"
  141. required: false
  142. type: boolean
  143. default: true
  144. bbrv3:
  145. description: "bbrv3"
  146. required: false
  147. type: boolean
  148. default: true
  149. ipv6_nat:
  150. description: "IPv6_NAT & IP-SET"
  151. required: false
  152. default: true
  153. type: boolean
  154. optimization:
  155. description: "optimization patches"
  156. required: false
  157. default: true
  158. type: boolean
  159. ttl:
  160. description: "TTL support"
  161. required: false
  162. default: true
  163. type: boolean
  164. cache:
  165. description: "CCache"
  166. required: false
  167. default: true
  168. type: boolean
  169. jobs:
  170. resolve-sources:
  171. runs-on: ubuntu-latest
  172. outputs:
  173. nomount_commit: ${{ steps.resolve.outputs.nomount_commit }}
  174. kernelsu_commit: ${{ steps.resolve.outputs.kernelsu_commit }}
  175. kernelsu_branch: ${{ steps.resolve.outputs.kernelsu_branch }}
  176. root_flavor: ${{ steps.resolve.outputs.root_flavor }}
  177. root_commit: ${{ steps.resolve.outputs.root_commit }}
  178. root_matrix: ${{ steps.resolve.outputs.root_matrix }}
  179. susfs_commit_android12_5_10: ${{ steps.resolve.outputs.susfs_commit_android12_5_10 }}
  180. susfs_commit_android13_5_10: ${{ steps.resolve.outputs.susfs_commit_android13_5_10 }}
  181. susfs_commit_android13_5_15: ${{ steps.resolve.outputs.susfs_commit_android13_5_15 }}
  182. susfs_commit_android14_5_15: ${{ steps.resolve.outputs.susfs_commit_android14_5_15 }}
  183. susfs_commit_android14_6_1: ${{ steps.resolve.outputs.susfs_commit_android14_6_1 }}
  184. susfs_commit_android15_6_6: ${{ steps.resolve.outputs.susfs_commit_android15_6_6 }}
  185. susfs_commit_android16_6_12: ${{ steps.resolve.outputs.susfs_commit_android16_6_12 }}
  186. susfs_commit_android12_5_10_resukisu: ${{ steps.resolve.outputs.susfs_commit_android12_5_10_resukisu }}
  187. susfs_commit_android13_5_10_resukisu: ${{ steps.resolve.outputs.susfs_commit_android13_5_10_resukisu }}
  188. susfs_commit_android13_5_15_resukisu: ${{ steps.resolve.outputs.susfs_commit_android13_5_15_resukisu }}
  189. susfs_commit_android14_5_15_resukisu: ${{ steps.resolve.outputs.susfs_commit_android14_5_15_resukisu }}
  190. susfs_commit_android14_6_1_resukisu: ${{ steps.resolve.outputs.susfs_commit_android14_6_1_resukisu }}
  191. susfs_commit_android15_6_6_resukisu: ${{ steps.resolve.outputs.susfs_commit_android15_6_6_resukisu }}
  192. susfs_commit_android16_6_12_resukisu: ${{ steps.resolve.outputs.susfs_commit_android16_6_12_resukisu }}
  193. ksu_commit: ${{ steps.resolve.outputs.ksu_commit }}
  194. resukisu_commit: ${{ steps.resolve.outputs.resukisu_commit }}
  195. steps:
  196. - name: Resolve pinned component commits
  197. id: resolve
  198. shell: bash
  199. run: |
  200. set -euo pipefail
  201. COMMIT_MODE="${{ inputs.commit_mode }}"
  202. echo "commit_mode=${COMMIT_MODE}"
  203. retry() {
  204. local n=0
  205. until [ "$n" -ge 5 ]; do
  206. "$@" && return 0
  207. n=$((n+1))
  208. echo "retry $n/5 failed for: $*" >&2
  209. sleep 5
  210. done
  211. return 1
  212. }
  213. resolve_sha() { retry git ls-remote "$1" "$2" | awk '{print $1; exit}'; }
  214. emit() {
  215. if [ -z "$2" ] || ! [[ "$2" =~ ^[0-9a-f]{40}$ ]]; then
  216. echo "Failed to resolve $1 (got: ${2:-empty})" >&2
  217. exit 1
  218. fi
  219. echo "$1=$2" >> "$GITHUB_OUTPUT"
  220. }
  221. # Audited pins - kept in sync with GKI_KernelSU_SUSFS dev
  222. PIN_NOMOUNT="9a1431782f390453de54610fb91bdad03eab5b43"
  223. PIN_KERNELSU="e38512f1255ea454d34cc2008d2ef7932547fad6"
  224. PIN_RESUKISU="0b5efe9e0102c43ca5c41174d500f5a7080cd0c7"
  225. declare -A PIN_SUSFS=(
  226. [susfs_commit_android12_5_10]="ec785f47d49f7b3871ca9356f450411020af7017"
  227. [susfs_commit_android13_5_10]="ed3d6d9c9a2652e1c70f153f5358701e996d646c"
  228. [susfs_commit_android13_5_15]="bca0d2333c1a7d717e7278b019d7af7ba1d16005"
  229. [susfs_commit_android14_5_15]="d54b51724afa912c4c99bb99731354ce934d1889"
  230. [susfs_commit_android14_6_1]="4fc9c1898ea66f51847cdbc0d1473ea4ef525a70"
  231. [susfs_commit_android15_6_6]="937215cb3a1b1f333d764c366c7a49972fa8e7a0"
  232. [susfs_commit_android16_6_12]="7d91da2d2ce056d1abf378d9199aaf1072d37ab0"
  233. )
  234. declare -A PIN_SUSFS_RESUKISU=(
  235. [susfs_commit_android12_5_10]="ec785f47d49f7b3871ca9356f450411020af7017"
  236. [susfs_commit_android13_5_10]="ed3d6d9c9a2652e1c70f153f5358701e996d646c"
  237. [susfs_commit_android13_5_15]="bca0d2333c1a7d717e7278b019d7af7ba1d16005"
  238. [susfs_commit_android14_5_15]="d54b51724afa912c4c99bb99731354ce934d1889"
  239. [susfs_commit_android14_6_1]="4fc9c1898ea66f51847cdbc0d1473ea4ef525a70"
  240. [susfs_commit_android15_6_6]="937215cb3a1b1f333d764c366c7a49972fa8e7a0"
  241. [susfs_commit_android16_6_12]="7d91da2d2ce056d1abf378d9199aaf1072d37ab0"
  242. )
  243. pick() {
  244. local pinned="$1" repo="$2" ref="$3"
  245. if [ "$COMMIT_MODE" = "verified" ] && [ -n "$pinned" ]; then
  246. echo "$pinned"
  247. else
  248. resolve_sha "$repo" "$ref"
  249. fi
  250. }
  251. emit nomount_commit "$(pick "$PIN_NOMOUNT" https://github.com/maxsteeel/nomount.git refs/heads/dev)"
  252. emit kernelsu_commit "$(resolve_sha https://github.com/KernelSU-Next/KernelSU-Next.git refs/heads/dev)"
  253. echo "kernelsu_branch=dev" >> "$GITHUB_OUTPUT"
  254. KERNELSU_COMMIT="$(pick "$PIN_KERNELSU" https://github.com/tiann/KernelSU.git refs/heads/main)"
  255. RESUKISU_COMMIT="$(pick "$PIN_RESUKISU" https://github.com/ReSukiSU/ReSukiSU.git refs/heads/main)"
  256. emit ksu_commit "$KERNELSU_COMMIT"
  257. emit resukisu_commit "$RESUKISU_COMMIT"
  258. if [ "${{ inputs.susfs }}" = "true" ]; then
  259. NEXT_COMMIT="$(resolve_sha https://github.com/pershoot/KernelSU-Next.git refs/heads/dev-susfs)"
  260. else
  261. NEXT_COMMIT="$(resolve_sha https://github.com/KernelSU-Next/KernelSU-Next.git refs/heads/dev)"
  262. fi
  263. mk_entry() { printf '{"root_flavor":"%s","variant":"%s","root_commit":"%s"}' "$1" "$2" "$3"; }
  264. case "${{ inputs.root_flavor }}" in
  265. KernelSU)
  266. echo "root_flavor=kernelsu" >> "$GITHUB_OUTPUT"
  267. emit root_commit "$KERNELSU_COMMIT"
  268. ROOT_MATRIX="[$(mk_entry kernelsu KernelSU "$KERNELSU_COMMIT")]"
  269. ;;
  270. KernelSU-Next)
  271. echo "root_flavor=next" >> "$GITHUB_OUTPUT"
  272. emit root_commit "$NEXT_COMMIT"
  273. ROOT_MATRIX="[$(mk_entry next KernelSU-Next "$NEXT_COMMIT")]"
  274. ;;
  275. ReSukiSU)
  276. echo "root_flavor=resukisu" >> "$GITHUB_OUTPUT"
  277. emit root_commit "$RESUKISU_COMMIT"
  278. ROOT_MATRIX="[$(mk_entry resukisu ReSukiSU "$RESUKISU_COMMIT")]"
  279. ;;
  280. All)
  281. ROOT_MATRIX="[$(mk_entry next KernelSU-Next "$NEXT_COMMIT"),$(mk_entry kernelsu KernelSU "$KERNELSU_COMMIT"),$(mk_entry resukisu ReSukiSU "$RESUKISU_COMMIT")]"
  282. echo "root_flavor=" >> "$GITHUB_OUTPUT"
  283. echo "root_commit=" >> "$GITHUB_OUTPUT"
  284. ;;
  285. *) echo "ERROR: unknown root_flavor '${{ inputs.root_flavor }}'" >&2; exit 1 ;;
  286. esac
  287. echo "root_matrix=$ROOT_MATRIX" >> "$GITHUB_OUTPUT"
  288. declare -A SUSFS_BRANCHES=(
  289. [susfs_commit_android12_5_10]="gki-android12-5.10"
  290. [susfs_commit_android13_5_10]="gki-android13-5.10"
  291. [susfs_commit_android13_5_15]="gki-android13-5.15"
  292. [susfs_commit_android14_5_15]="gki-android14-5.15"
  293. [susfs_commit_android14_6_1]="gki-android14-6.1"
  294. [susfs_commit_android15_6_6]="gki-android15-6.6"
  295. [susfs_commit_android16_6_12]="gki-android16-6.12"
  296. )
  297. for key in "${!SUSFS_BRANCHES[@]}"; do
  298. emit "$key" "$(pick "${PIN_SUSFS[$key]}" https://gitlab.com/simonpunk/susfs4ksu.git refs/heads/${SUSFS_BRANCHES[$key]})"
  299. emit "${key}_resukisu" "$(pick "${PIN_SUSFS_RESUKISU[$key]}" https://gitlab.com/simonpunk/susfs4ksu.git refs/heads/${SUSFS_BRANCHES[$key]})"
  300. done
  301. echo "Resolved:"
  302. env | grep -E '^(nomount_commit|kernelsu_commit|root_commit|susfs_commit_)' | sort || true
  303. build-samsung:
  304. needs: resolve-sources
  305. strategy:
  306. fail-fast: false
  307. matrix:
  308. include: ${{ fromJSON(needs.resolve-sources.outputs.root_matrix) }}
  309. uses: ./.github/workflows/kernel-samsung.yml
  310. secrets: inherit
  311. with:
  312. device: ${{ inputs.device }}
  313. root_flavor: ${{ matrix.root_flavor }}
  314. root_commit: ${{ matrix.root_commit }}
  315. variant: ${{ matrix.variant }}
  316. susfs_commit: ${{ matrix.root_flavor == 'resukisu' && needs.resolve-sources.outputs.susfs_commit_android14_6_1_resukisu || needs.resolve-sources.outputs.susfs_commit_android14_6_1 }}
  317. susfs_commit_android12_5_10: ${{ needs.resolve-sources.outputs.susfs_commit_android12_5_10 }}
  318. susfs_commit_android13_5_10: ${{ needs.resolve-sources.outputs.susfs_commit_android13_5_10 }}
  319. susfs_commit_android13_5_15: ${{ needs.resolve-sources.outputs.susfs_commit_android13_5_15 }}
  320. susfs_commit_android14_5_15: ${{ needs.resolve-sources.outputs.susfs_commit_android14_5_15 }}
  321. susfs_commit_android14_6_1: ${{ needs.resolve-sources.outputs.susfs_commit_android14_6_1 }}
  322. susfs_commit_android15_6_6: ${{ needs.resolve-sources.outputs.susfs_commit_android15_6_6 }}
  323. susfs_commit_android16_6_12: ${{ needs.resolve-sources.outputs.susfs_commit_android16_6_12 }}
  324. nomount_commit: ${{ needs.resolve-sources.outputs.nomount_commit }}
  325. susfs: ${{ inputs.susfs }}
  326. bbg: ${{ inputs.bbg }}
  327. unicodefix: ${{ inputs.unicodefix }}
  328. zeromount: ${{ inputs.zeromount }}
  329. nomount: ${{ inputs.nomount }}
  330. droidspace: ${{ inputs.droidspace }}
  331. ntsync: ${{ inputs.ntsync }}
  332. bbrv3: ${{ inputs.bbrv3 }}
  333. ipv6_nat: ${{ inputs.ipv6_nat }}
  334. optimization: ${{ inputs.optimization }}
  335. ttl: ${{ inputs.ttl }}
  336. cache: ${{ inputs.cache }}
  337. lto: ${{ inputs.lto }}
  338. release:
  339. runs-on: ubuntu-latest
  340. if: inputs.release_type != 'Actions'
  341. needs:
  342. - build-samsung
  343. - resolve-sources
  344. env:
  345. GH_TOKEN: ${{ github.token }}
  346. RELEASE_NAME: "Samsung Kernels With SUSFS v2.3.0"
  347. RELEASE_BODY: ""
  348. steps:
  349. - name: Free Disk Space
  350. if: true
  351. uses: endersonmenezes/free-disk-space@v3
  352. with:
  353. remove_android: true
  354. remove_dotnet: true
  355. remove_haskell: true
  356. remove_tool_cache: true
  357. remove_swap: true
  358. remove_packages: "azure-cli google-cloud-cli microsoft-edge-stable google-chrome-stable firefox postgresql* temurin-* *llvm* mysql* dotnet-sdk-*"
  359. remove_packages_one_command: true
  360. remove_folders: "/usr/share/swift /usr/share/miniconda /usr/share/az* /usr/local/lib/node_modules /usr/local/share/chromium /usr/local/share/powershell /usr/local/julia /usr/local/aws-cli /usr/local/aws-sam-cli /usr/share/gradle"
  361. rm_cmd: "rmz"
  362. rmz_version: "3.1.1"
  363. testing: false
  364. - name: Checkout code
  365. uses: actions/checkout@v7
  366. - name: Generate New Tag
  367. if: inputs.release_type != 'Actions'
  368. run: |
  369. LATEST_TAG=$(gh api repos/${{ github.repository }}/tags --jq '.[0].name' 2>/dev/null || echo "")
  370. if [ -z "$LATEST_TAG" ]; then
  371. LATEST_TAG="v2.3.0-r0"
  372. fi
  373. NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
  374. echo "New tag: $NEW_TAG"
  375. echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
  376. - name: Download Artifacts
  377. uses: actions/download-artifact@v8
  378. with:
  379. path: ./downloaded-artifacts
  380. pattern: '*-AnyKernel3'
  381. - name: get commit hashes
  382. run: |
  383. echo "SUSFS_510=${{ needs.resolve-sources.outputs.susfs_commit_android12_5_10 }}" >> $GITHUB_ENV
  384. echo "SUSFS_515=${{ needs.resolve-sources.outputs.susfs_commit_android13_5_15 }}" >> $GITHUB_ENV
  385. echo "SUSFS_61=${{ needs.resolve-sources.outputs.susfs_commit_android14_6_1 }}" >> $GITHUB_ENV
  386. echo "SUSFS_66=${{ needs.resolve-sources.outputs.susfs_commit_android15_6_6 }}" >> $GITHUB_ENV
  387. echo "KSU_COMMIT=${{ needs.resolve-sources.outputs.ksu_commit }}" >> $GITHUB_ENV
  388. echo "KSUN_COMMIT=${{ needs.resolve-sources.outputs.kernelsu_commit }}" >> $GITHUB_ENV
  389. echo "RESUKI_COMMIT=${{ needs.resolve-sources.outputs.resukisu_commit }}" >> $GITHUB_ENV
  390. echo "NM_HASH=${{ needs.resolve-sources.outputs.nomount_commit }}" >> $GITHUB_ENV
  391. - name: Set release body
  392. run: |
  393. cat << 'EOF' > release_body.md
  394. **IMPORTANT DISCLAIMER**
  395. This software is provided for testing and educational purposes only. Use at your own risk.
  396. The developers are not responsible for any damage, data loss, or issues that may occur.
  397. Please ensure you have proper backups before installation.
  398. Features:
  399. EOF
  400. cat <<EOF >> release_body.md
  401. -> Root: ${{ inputs.root_flavor }} (commit_mode: ${{ inputs.commit_mode }})
  402. EOF
  403. if [ "${{ inputs.susfs }}" = "true" ]; then
  404. cat <<'EOF' >> release_body.md
  405. -> SUSFS v2.3.0 - https://gitlab.com/simonpunk/susfs4ksu
  406. -> SUSFS Inline hooks
  407. EOF
  408. fi
  409. if [ "${{ inputs.bbg }}" = "true" ]; then
  410. cat <<'EOF' >> release_body.md
  411. -> BBG - https://github.com/vc-teahouse/Baseband-guard
  412. EOF
  413. fi
  414. if [ "${{ inputs.unicodefix }}" = "true" ]; then
  415. cat <<'EOF' >> release_body.md
  416. -> unicode fix - Prevent path traversal and other detections using non-printable Unicode codepoints
  417. EOF
  418. fi
  419. if [ "${{ inputs.zeromount }}" = "true" ]; then
  420. cat <<'EOF' >> release_body.md
  421. -> Zeromount - https://github.com/Enginex0/zeromount
  422. EOF
  423. fi
  424. if [ "${{ inputs.nomount }}" = "true" ]; then
  425. cat <<'EOF' >> release_body.md
  426. -> NoMount - https://github.com/maxsteeel/nomount
  427. EOF
  428. fi
  429. if [ "${{ inputs.droidspace }}" = "true" ]; then
  430. cat <<'EOF' >> release_body.md
  431. -> droidspaces support - https://github.com/ravindu644/Droidspaces-OSS
  432. EOF
  433. fi
  434. if [ "${{ inputs.ntsync }}" = "true" ]; then
  435. cat <<'EOF' >> release_body.md
  436. -> NTSync - Provide high-performance, low-latency synchronization primitives compatible with the Windows NT kernel API
  437. EOF
  438. fi
  439. if [ "${{ inputs.bbrv3 }}" = "true" ]; then
  440. cat <<'EOF' >> release_body.md
  441. -> TCP BBRV3 (better TCP congestion and faster internet)
  442. -> CAKE and PIE qdisc Support - Better Net Schedulers
  443. EOF
  444. fi
  445. if [ "${{ inputs.ipv6_nat }}" = "true" ]; then
  446. cat <<'EOF' >> release_body.md
  447. -> IP Set & IPv6 NAT Support - Advanced firewall capabilities and IPv6 NAT Support
  448. EOF
  449. fi
  450. if [ "${{ inputs.ttl }}" = "true" ]; then
  451. cat <<'EOF' >> release_body.md
  452. -> TTL Target Support - Network packet manipulation
  453. EOF
  454. fi
  455. if [ "${{ inputs.optimization }}" = "true" ]; then
  456. cat <<'EOF' >> release_body.md
  457. -> Kernel Optimization - Memory, I/O, CPU scheduler, network and other general tunings
  458. -> Patches for optimizations can be found here - https://github.com/WildKernels/kernel_patches/tree/main/common
  459. EOF
  460. fi
  461. echo "-> Built using LTO: ${{ inputs.lto }}" >> release_body.md
  462. cat <<'EOF' >> release_body.md
  463. Notes:
  464. - Currently kpm ONLY works for S24U and S25U.
  465. Module:
  466. -> https://github.com/sidex15/ksu_module_susfs
  467. -> https://github.com/rrr333nnn333/BRENE
  468. Pinned Commits (verified mode):
  469. EOF
  470. cat <<EOF >> release_body.md
  471. KernelSU: ${{ env.KSU_COMMIT }}
  472. KernelSU-Next: ${{ env.KSUN_COMMIT }}
  473. ReSukiSU: ${{ env.RESUKI_COMMIT }}
  474. SUSFS 5.10: ${{ env.SUSFS_510 }}
  475. SUSFS 6.1: ${{ env.SUSFS_61 }}
  476. SUSFS 6.6: ${{ env.SUSFS_66 }}
  477. NoMount: ${{ env.NM_HASH }}
  478. EOF
  479. - name: Create GitHub Release
  480. uses: softprops/action-gh-release@v3
  481. with:
  482. tag_name: ${{ env.NEW_TAG }}
  483. prerelease: ${{ inputs.release_type == 'Pre-Release' }}
  484. files: ""
  485. name: ${{ env.RELEASE_NAME }}
  486. body_path: release_body.md
  487. - name: Upload Release Assets
  488. run: |
  489. shopt -s nullglob
  490. anykernel_dirs=(./downloaded-artifacts/*/)
  491. if [ ${#anykernel_dirs[@]} -eq 0 ]; then
  492. echo "No artifact directories found under ./downloaded-artifacts; skipping upload."
  493. else
  494. for dir in "${anykernel_dirs[@]}"; do
  495. if [[ "$(basename "$dir")" == *"-AnyKernel3" ]]; then
  496. artifact_name=$(basename "$dir")
  497. echo "Creating ZIP for $artifact_name..."
  498. cd "$dir"
  499. zip -r -9 "../../${artifact_name}.zip" ./*
  500. cd - > /dev/null
  501. echo "Uploading ${artifact_name}.zip..."
  502. gh release upload ${{ env.NEW_TAG }} "${artifact_name}.zip"
  503. fi
  504. done
  505. fi