4444 description : " Choose SusFS Branch for android15-6.6"
4545 type : string
4646 default : " gki-android15-6.6"
47-
47+
4848jobs :
49- build-batch-1 : # Non Bazel Builds
49+ build-batch-1 :
5050 name : build-batch-1 (${{ matrix.model }}, ${{ matrix.soc }}, ${{ matrix.branch }}, ${{ matrix.manifest }}, ${{ matrix.android_version }}, ${{ matrix.kernel_version }}, ${{ inputs.ksun_branch }})
5151 strategy :
5252 fail-fast : false
@@ -139,10 +139,12 @@ jobs:
139139 echo "susfs_branch=$SUSFS_BRANCH" >> $GITHUB_OUTPUT
140140
141141 - name : Checkout Code
142- uses : actions/checkout@v3
142+ uses : actions/checkout@v4
143+ with :
144+ fetch-depth : 1
143145
144146 - name : Build Kernel
145- uses : ./.github/actions/
147+ uses : ./.github/actions
146148 with :
147149 model : ${{ matrix.model }}
148150 soc : ${{ matrix.soc }}
@@ -152,9 +154,15 @@ jobs:
152154 kernel_version : ${{ matrix.kernel_version }}
153155 ksun_branch : ${{ inputs.ksun_branch }}
154156 susfs_branch : ${{ steps.get-susfs-branch.outputs.susfs_branch }}
157+
158+ - name : Upload Build Artifacts
159+ uses : actions/upload-artifact@v4
160+ with :
161+ name : ${{ matrix.model }}-kernel
162+ path : ${{ matrix.model }}/artifacts/
163+ if-no-files-found : error
155164
156165 build-batch-2 :
157- # needs: build-batch-1
158166 name : build-batch-2 (${{ matrix.model }}, ${{ matrix.soc }}, ${{ matrix.branch }}, ${{ matrix.manifest }}, ${{ matrix.android_version }}, ${{ matrix.kernel_version }}, ${{ inputs.ksun_branch }})
159167 strategy :
160168 fail-fast : false
@@ -259,7 +267,9 @@ jobs:
259267 echo "susfs_branch=$SUSFS_BRANCH" >> $GITHUB_OUTPUT
260268
261269 - name : Checkout Code
262- uses : actions/checkout@v3
270+ uses : actions/checkout@v4
271+ with :
272+ fetch-depth : 1
263273
264274 - name : Build Kernel
265275 uses : ./.github/actions
@@ -272,6 +282,13 @@ jobs:
272282 kernel_version : ${{ matrix.kernel_version }}
273283 ksun_branch : ${{ inputs.ksun_branch }}
274284 susfs_branch : ${{ steps.get-susfs-branch.outputs.susfs_branch }}
285+
286+ - name : Upload Build Artifacts
287+ uses : actions/upload-artifact@v4
288+ with :
289+ name : ${{ matrix.model }}-kernel
290+ path : ${{ matrix.model }}/artifacts/
291+ if-no-files-found : error
275292
276293 trigger-release :
277294 needs :
@@ -287,22 +304,24 @@ jobs:
287304
288305 steps :
289306 - name : Checkout code
290- uses : actions/checkout@v3
307+ uses : actions/checkout@v4
308+ with :
309+ fetch-depth : 1
291310
292311 - name : Generate and Create New Tag
293312 run : |
294- BASE_TAG="v1.5.9-r0"
295- LATEST_TAG=$(gh api repos/$REPO_OWNER/$REPO_NAME/tags --jq '.[0].name')
296- if [ -z "$LATEST_TAG" ]; then
297- LATEST_TAG="$BASE_TAG"
298- else
299- LATEST_TAG=$(printf "%s\n%s\n" "$LATEST_TAG" "$BASE_TAG" | sort -rV | head -n1)
300- fi
301- NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
302- echo "New tag: $NEW_TAG"
303- echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
304- git tag $NEW_TAG
305- git push origin $NEW_TAG
313+ BASE_TAG="v1.5.9-r0"
314+ LATEST_TAG=$(gh api repos/$REPO_OWNER/$REPO_NAME/tags --jq '.[0].name')
315+ if [ -z "$LATEST_TAG" ]; then
316+ LATEST_TAG="$BASE_TAG"
317+ else
318+ LATEST_TAG=$(printf "%s\n%s\n" "$LATEST_TAG" "$BASE_TAG" | sort -rV | head -n1)
319+ fi
320+ NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
321+ echo "New tag: $NEW_TAG"
322+ echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
323+ git tag $NEW_TAG
324+ git push origin $NEW_TAG
306325
307326 - name : Download Artifacts
308327 uses : actions/download-artifact@v4
@@ -328,16 +347,16 @@ jobs:
328347 |-------|----------------|
329348 EOF
330349
331- # === Generate table rows ===
332- while IFS= read -r file ; do
350+ # Generate table rows
351+ for file in $(find downloaded-artifacts -name "*.zip" -type f | sort) ; do
333352 if [ -f "$file" ]; then
334- model=$(basename "$file" .txt )
335- version =$(cat "$file")
336- printf "| %-7s | %-16s |\n" "$model" "$version " >> release_notes.md
353+ model=$(basename "$(dirname "$ file")" | sed 's/-kernel$//' )
354+ kernel_version =$(grep -oP 'android\d+-\d+\.\d+' "$file" || echo "${{ matrix.android_version }}-${{ matrix.kernel_version }} ")
355+ printf "| %-12s | %-16s |\n" "$model" "$kernel_version " >> release_notes.md
337356 fi
338- done < <(find downloaded-artifacts -name "*.txt" -type f | sort)
357+ done
339358
340- # === Add features and finalize ===
359+ # Add features and finalize
341360 cat << 'EOF' >> release_notes.md
342361
343362 ### Features
@@ -350,11 +369,11 @@ jobs:
350369 - [+] Ptrace message leak fix for kernels < 5.16
351370 - [+] Manual Hooks [scope_min_manual_hooks_v1.4]
352371 - [+] CONFIG_TMPFS_XATTR Support [Mountify Support]
353- - [+] BBR v1 Support.
354- - [+] HMBIRD scx support for OnePlus 13 & OnePlus Ace 5 Pro.
372+ - [+] BBR v1 Support
373+ - [+] HMBIRD scx support for OnePlus 13 & OnePlus Ace 5 Pro
355374 EOF
356375
357- # === Output for debugging ===
376+ # Output for debugging
358377 echo "--- Final Release Notes ---"
359378 cat release_notes.md
360379
@@ -365,23 +384,12 @@ jobs:
365384 --title "${{ env.RELEASE_NAME }}" \
366385 --notes-file release_notes.md \
367386 --prerelease
368- env :
369- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
370387
371388 - name : Upload Release Assets Dynamically
372389 run : |
373- for file in ./downloaded-artifacts/kernel-*/*.zip; do
374- if [ -d "$file" ]; then
375- continue
376- fi
390+ for file in ./downloaded-artifacts/*/*.zip; do
391+ if [ -f "$file" ]; then
377392 echo "Uploading $file..."
378- gh release upload ${{ env.NEW_TAG }} "$file"
393+ gh release upload "${{ env.NEW_TAG }}" "$file" --clobber
394+ fi
379395 done
380- env :
381- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
382- NEW_TAG : ${{ env.NEW_TAG }}
383-
384- - name : Display Files Uploaded
385- run : |
386- echo "GitHub release created with the following files:"
387- ls ./downloaded-artifacts/**/*
0 commit comments