main.yml 21 KB

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