11name : Build and Release OnePlus Kernels
22
33permissions :
4- contents : write # Allow writing to repository contents (for pushing tags)
5- actions : write # Allows triggering actions
6-
4+ contents : write
5+ actions : write
6+
77on :
88 workflow_dispatch :
99 inputs :
@@ -12,148 +12,157 @@ on:
1212 required : true
1313 type : boolean
1414 default : true
15+ ksun_branch :
16+ description : " Choose KernelSU Next Branch"
17+ required : true
18+ type : choice
19+ options :
20+ - stable
21+ - next
22+ - next-susfs
23+ - next-susfs-dev
24+ default : stable
1525
1626jobs :
17- build-kernel-op11 :
18- uses : ./.github/workflows/build.yml
19- secrets : inherit
20- with :
21- model : " OP11"
22- soc : " kalama"
23- branch : " oneplus/sm8550"
24- manifest : " oneplus_11_v.xml"
25- android_version : " android13"
26- kernel_version : " 5.15"
27- build-kernel-op11r :
28- uses : ./.github/workflows/build.yml
29- secrets : inherit
30- with :
31- model : " OP11r"
32- soc : " waipio"
33- branch : " oneplus/sm8475"
34- manifest : " oneplus_11r_v.xml"
35- android_version : " android13"
36- kernel_version : " 5.10"
37- build-kernel-op12 :
38- uses : ./.github/workflows/build.yml
39- secrets : inherit
40- with :
41- model : " OP12"
42- soc : " pineapple"
43- branch : " oneplus/sm8650"
44- manifest : " oneplus12_v.xml"
45- android_version : " android14"
46- kernel_version : " 6.1"
47- build-kernel-op13r :
48- uses : ./.github/workflows/build.yml
49- secrets : inherit
50- with :
51- model : " OP13r"
52- soc : " pineapple"
53- branch : " oneplus/sm8650"
54- manifest : " oneplus_13r.xml"
55- android_version : " android14"
56- kernel_version : " 6.1"
57- build-kernel-opnord4 :
58- uses : ./.github/workflows/build.yml
59- secrets : inherit
60- with :
61- model : " OP-NORD-4"
62- soc : " pineapple"
63- branch : " oneplus/sm7675"
64- manifest : " oneplus_nord_4_v.xml"
65- android_version : " android14"
66- kernel_version : " 6.1"
67- build-kernel-opopen :
68- uses : ./.github/workflows/build.yml
69- secrets : inherit
70- with :
71- model : " OP-OPEN"
72- soc : " kalama"
73- branch : " oneplus/sm8550"
74- manifest : " oneplus_open_v.xml"
75- android_version : " android13"
76- kernel_version : " 5.15"
77- build-kernel-opace2 :
78- uses : ./.github/workflows/build.yml
79- secrets : inherit
80- with :
81- model : " OP-ACE-2"
82- soc : " waipio"
83- branch : " oneplus/sm8475"
84- manifest : " oneplus_ace2_v.xml"
85- android_version : " android13"
86- kernel_version : " 5.10"
87- build-kernel-opace2pro :
88- uses : ./.github/workflows/build.yml
89- secrets : inherit
90- with :
91- model : " OP-ACE-2-PRO"
92- soc : " kalama"
93- branch : " oneplus/sm8550"
94- manifest : " oneplus_ace2pro_v.xml"
95- android_version : " android13"
96- kernel_version : " 5.15"
97- build-kernel-opace5 :
98- uses : ./.github/workflows/build.yml
99- secrets : inherit
100- with :
101- model : " OP-ACE-5"
102- soc : " pineapple"
103- branch : " oneplus/sm8650"
104- manifest : " oneplus_ace5.xml"
105- android_version : " android14"
106- kernel_version : " 6.1"
107- build-kernel-op10t :
27+ build-batch-1 : # Non Bazel Builds
28+ name : build-batch-1 (${{ matrix.model }}, ${{ matrix.soc }}, ${{ matrix.branch }}, ${{ matrix.manifest }}, ${{ matrix.android_version }}, ${{ matrix.kernel_version }}, ${{ inputs.ksun_branch }})
29+ strategy :
30+ fail-fast : false
31+ matrix :
32+ include :
33+ - model : OP11
34+ soc : kalama
35+ branch : oneplus/sm8550
36+ manifest : oneplus_11_v.xml
37+ android_version : android13
38+ kernel_version : " 5.15"
39+ - model : OP11r
40+ soc : waipio
41+ branch : oneplus/sm8475
42+ manifest : oneplus_11r_v.xml
43+ android_version : android13
44+ kernel_version : " 5.10"
45+ - model : OP-OPEN
46+ soc : kalama
47+ branch : oneplus/sm8550
48+ manifest : oneplus_open_v.xml
49+ android_version : android13
50+ kernel_version : " 5.15"
51+ - model : OP-ACE-2
52+ soc : waipio
53+ branch : oneplus/sm8475
54+ manifest : oneplus_ace2_v.xml
55+ android_version : android13
56+ kernel_version : " 5.10"
57+ - model : OP10t
58+ soc : waipio
59+ branch : oneplus/sm8475
60+ manifest : oneplus_10t_v.xml
61+ android_version : android12
62+ kernel_version : " 5.10"
63+ - model : OP10pro
64+ soc : waipio
65+ branch : oneplus/sm8450
66+ manifest : oneplus_10_pro_v.xml
67+ android_version : android12
68+ kernel_version : " 5.10"
69+ - model : OP-ACE-2-PRO
70+ soc : kalama
71+ branch : oneplus/sm8550
72+ manifest : oneplus_ace2pro_v.xml
73+ android_version : android13
74+ kernel_version : " 5.15"
10875 uses : ./.github/workflows/build.yml
10976 secrets : inherit
11077 with :
111- model : " OP10t"
112- soc : " waipio"
113- branch : " oneplus/sm8475"
114- manifest : " oneplus_10t_v.xml"
115- android_version : " android12"
116- kernel_version : " 5.10"
117- build-kernel-op10pro :
78+ model : ${{ matrix.model }}
79+ soc : ${{ matrix.soc }}
80+ branch : ${{ matrix.branch }}
81+ manifest : ${{ matrix.manifest }}
82+ android_version : ${{ matrix.android_version }}
83+ kernel_version : ${{ matrix.kernel_version }}
84+ ksun_branch : ${{ inputs.ksun_branch }}
85+
86+ build-batch-2 :
87+ # needs: build-batch-1
88+ name : build-batch-2 (${{ matrix.model }}, ${{ matrix.soc }}, ${{ matrix.branch }}, ${{ matrix.manifest }}, ${{ matrix.android_version }}, ${{ matrix.kernel_version }}, ${{ inputs.ksun_branch }})
89+ strategy :
90+ fail-fast : false
91+ matrix :
92+ include :
93+ - model : OP13
94+ soc : sun
95+ branch : oneplus/sm8750
96+ manifest : oneplus_13.xml
97+ android_version : android15
98+ kernel_version : " 6.6"
99+ - model : OPAce5Pro
100+ soc : sun
101+ branch : oneplus/sm8750
102+ manifest : oneplus_ace5_pro.xml
103+ android_version : android15
104+ kernel_version : " 6.6"
105+ - model : OP12
106+ soc : pineapple
107+ branch : oneplus/sm8650
108+ manifest : oneplus12_v.xml
109+ android_version : android14
110+ kernel_version : " 6.1"
111+ - model : OP13r
112+ soc : pineapple
113+ branch : oneplus/sm8650
114+ manifest : oneplus_13r.xml
115+ android_version : android14
116+ kernel_version : " 6.1"
117+ - model : OP-ACE-5
118+ soc : pineapple
119+ branch : oneplus/sm8650
120+ manifest : oneplus_ace5.xml
121+ android_version : android14
122+ kernel_version : " 6.1"
123+ - model : OP-NORD-4
124+ soc : pineapple
125+ branch : oneplus/sm7675
126+ manifest : oneplus_nord_4_v.xml
127+ android_version : android14
128+ kernel_version : " 6.1"
129+ - model : OP-PAD-2
130+ soc : pineapple
131+ branch : oneplus/sm8650
132+ manifest : oneplus_pad2_v.xml
133+ android_version : android14
134+ kernel_version : " 6.1"
118135 uses : ./.github/workflows/build.yml
119136 secrets : inherit
120137 with :
121- model : " OP10pro"
122- soc : " waipio"
123- branch : " oneplus/sm8450"
124- manifest : " oneplus_10_pro_v.xml"
125- android_version : " android12"
126- kernel_version : " 5.10"
138+ model : ${{ matrix.model }}
139+ soc : ${{ matrix.soc }}
140+ branch : ${{ matrix.branch }}
141+ manifest : ${{ matrix.manifest }}
142+ android_version : ${{ matrix.android_version }}
143+ kernel_version : ${{ matrix.kernel_version }}
144+ ksun_branch : ${{ inputs.ksun_branch }}
127145
128146 trigger-release :
129- runs-on : ubuntu-latest
130147 needs :
131- - build-kernel-op11
132- - build-kernel-op11r
133- - build-kernel-op12
134- - build-kernel-op13r
135- - build-kernel-opnord4
136- - build-kernel-opopen
137- - build-kernel-opace2
138- - build-kernel-opace2pro
139- - build-kernel-opace5
140- - build-kernel-op10t
141- - build-kernel-op10pro
148+ - build-batch-1
149+ - build-batch-2
150+ runs-on : ubuntu-latest
142151 if : ${{ inputs.make_release }}
143152 env :
144- REPO_OWNER : TheWildJames
145- REPO_NAME : OnePlus_KernelSU_SUSFS
153+ REPO_OWNER : ${{ github.repository_owner }}
154+ REPO_NAME : ${{ github.event.repository.name }}
146155 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
147- RELEASE_NAME : " *TEST BUILD* OnePlus Kernels With KernelSU Next & SUSFS v1.5.5 *TEST BUILD*"
156+ RELEASE_NAME : " *TEST BUILD* OnePlus Kernels With KernelSU Next & SUSFS v1.5.7 *TEST BUILD*"
148157 RELEASE_NOTES : |
149158 This release contains KernelSU Next and SUSFS v1.5.7
150159
151160 Module:
152161 -> https://github.com/sidex15/ksu_module_susfs
153-
162+
154163 Non-Official Managers:
155164 -> https://github.com/KernelSU-Next/KernelSU-Next
156-
165+
157166 Features:
158167 [+] KernelSU-Next
159168 [+] SUSFS v1.5.7
@@ -163,67 +172,49 @@ jobs:
163172 [+] Magic Mount Support
164173
165174 steps :
166- # Checkout the code
167175 - name : Checkout code
168176 uses : actions/checkout@v3
169177
170- # Get the Latest Tag from GitHub
171178 - name : Generate and Create New Tag
172179 run : |
173- # Fetch the latest tag from GitHub (this is the latest tag based on the GitHub API)
174180 LATEST_TAG=$(gh api repos/$REPO_OWNER/$REPO_NAME/tags --jq '.[0].name')
175181 if [ -z "$LATEST_TAG" ]; then
176- LATEST_TAG="v1.5.7-r0" # Default to v1.5.3-0 if no tag exists
182+ LATEST_TAG="v1.5.7-r0"
177183 fi
178-
179- # Increment the suffix (e.g., v1.5.3-0 becomes v1.5.3-1)
180184 NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
181-
182- # Output the new tag to be used
183185 echo "New tag: $NEW_TAG"
184-
185- # Set the new tag as an environment variable to be used in later steps
186186 echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
187-
188- # Create the tag in the repository
189187 git tag $NEW_TAG
190188 git push origin $NEW_TAG
191-
192- # Download Artifacts for A12 (Only if A12 Build is successful or input is true or empty)
189+
193190 - name : Download Artifacts
194191 uses : actions/download-artifact@v4
195192 with :
196193 path : ./downloaded-artifacts
197194
198- # Create GitHub Release and upload files if make_release is true
199195 - name : Create GitHub Release
200196 uses : actions/create-release@v1
201197 with :
202- tag_name : ${{ env.NEW_TAG }} # Use the generated tag for the release
203- prerelease : true # Mark the release as a pre-release
204- release_name : ${{ env.RELEASE_NAME }} # Pass the RELEASE_NAME to the action
205- body : ${{ env.RELEASE_NOTES }} # Pass the RELEASE_NOTES to the action
198+ tag_name : ${{ env.NEW_TAG }}
199+ prerelease : true
200+ release_name : ${{ env.RELEASE_NAME }}
201+ body : ${{ env.RELEASE_NOTES }}
206202 env :
207203 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
208204
209205 - name : Upload Release Assets Dynamically
210206 run : |
211- # Loop through all files in the downloaded-artifacts directory
212207 for file in ./downloaded-artifacts/kernel-*/*; do
213- # Skip directories
214208 if [ -d "$file" ]; then
215209 continue
216210 fi
217-
218- # Upload the file to the GitHub release
219211 echo "Uploading $file..."
220212 gh release upload ${{ env.NEW_TAG }} "$file"
221213 done
222214 env :
223215 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
224216 NEW_TAG : ${{ env.NEW_TAG }}
225217
226- # Display Files Uploaded
227218 - name : Display Files Uploaded
228219 run : |
229220 echo "GitHub release created with the following files:"
0 commit comments