forked from WildKernels/OnePlus_KernelSU_SUSFS
-
Notifications
You must be signed in to change notification settings - Fork 22
258 lines (240 loc) · 8.73 KB
/
build-kernel-release.yml
File metadata and controls
258 lines (240 loc) · 8.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
name: Build and Release OnePlus Kernels
permissions:
contents: write # Allow writing to repository contents (for pushing tags)
actions: write # Allows triggering actions
on:
workflow_dispatch:
inputs:
make_release:
description: 'Do you want to create a release?'
required: true
type: boolean
default: true
jobs:
# build-kernel-op11:
# uses: ./.github/workflows/build.yml
# secrets: inherit
# with:
# model: "OP11"
# soc: "kalama"
# branch: "oneplus/sm8550"
# manifest: "oneplus_11_v.xml"
# android_version: "android13"
# kernel_version: "5.15"
# build-kernel-op11r:
# uses: ./.github/workflows/build.yml
# secrets: inherit
# with:
# model: "OP11r"
# soc: "waipio"
# branch: "oneplus/sm8475"
# manifest: "oneplus_11r_v.xml"
# android_version: "android13"
# kernel_version: "5.10"
# build-kernel-opopen:
# uses: ./.github/workflows/build.yml
# secrets: inherit
# with:
# model: "OP-OPEN"
# soc: "kalama"
# branch: "oneplus/sm8550"
# manifest: "oneplus_open_v.xml"
# android_version: "android13"
# kernel_version: "5.15"
# build-kernel-opace2:
# uses: ./.github/workflows/build.yml
# secrets: inherit
# with:
# model: "OP-ACE-2"
# soc: "waipio"
# branch: "oneplus/sm8475"
# manifest: "oneplus_ace2_v.xml"
# android_version: "android13"
# kernel_version: "5.10"
# build-kernel-op10t:
# uses: ./.github/workflows/build.yml
# secrets: inherit
# with:
# model: "OP10t"
# soc: "waipio"
# branch: "oneplus/sm8475"
# manifest: "oneplus_10t_v.xml"
# android_version: "android12"
# kernel_version: "5.10"
# build-kernel-op10pro:
# uses: ./.github/workflows/build.yml
# secrets: inherit
# with:
# model: "OP10pro"
# soc: "waipio"
# branch: "oneplus/sm8450"
# manifest: "oneplus_10_pro_v.xml"
# android_version: "android12"
# kernel_version: "5.10"
# build-kernel-opace2pro:
# uses: ./.github/workflows/build.yml
# secrets: inherit
# with:
# model: "OP-ACE-2-PRO"
# soc: "kalama"
# branch: "oneplus/sm8550"
# manifest: "oneplus_ace2pro_v.xml"
# android_version: "android13"
# kernel_version: "5.15"
# build-kernel-op12:
# uses: ./.github/workflows/build.yml
# needs: [build-kernel-op11, build-kernel-op11r, build-kernel-opopen, build-kernel-opace2, build-kernel-op10t, build-kernel-op10pro, build-kernel-opace2pro]
# secrets: inherit
# with:
# model: "OP12"
# soc: "pineapple"
# branch: "oneplus/sm8650"
# manifest: "oneplus12_v.xml"
# android_version: "android14"
# kernel_version: "6.1"
# build-kernel-op13r:
# uses: ./.github/workflows/build.yml
# needs: [build-kernel-op11, build-kernel-op11r, build-kernel-opopen, build-kernel-opace2, build-kernel-op10t, build-kernel-op10pro, build-kernel-opace2pro]
# secrets: inherit
# with:
# model: "OP13r"
# soc: "pineapple"
# branch: "oneplus/sm8650"
# manifest: "oneplus_13r.xml"
# android_version: "android14"
# kernel_version: "6.1"
# build-kernel-opnord4:
# uses: ./.github/workflows/build.yml
# needs: [build-kernel-op11, build-kernel-op11r, build-kernel-opopen, build-kernel-opace2, build-kernel-op10t, build-kernel-op10pro, build-kernel-opace2pro]
# secrets: inherit
# with:
# model: "OP-NORD-4"
# soc: "pineapple"
# branch: "oneplus/sm7675"
# manifest: "oneplus_nord_4_v.xml"
# android_version: "android14"
# kernel_version: "6.1"
# build-kernel-opace5:
# uses: ./.github/workflows/build.yml
# needs: [build-kernel-op11, build-kernel-op11r, build-kernel-opopen, build-kernel-opace2, build-kernel-op10t, build-kernel-op10pro, build-kernel-opace2pro]
# secrets: inherit
# with:
# model: "OP-ACE-5"
# soc: "pineapple"
# branch: "oneplus/sm8650"
# manifest: "oneplus_ace5.xml"
# android_version: "android14"
# kernel_version: "6.1"
build-kernel-op13:
uses: ./.github/workflows/build.yml
# needs: [build-kernel-op11, build-kernel-op11r, build-kernel-opopen, build-kernel-opace2, build-kernel-op10t, build-kernel-op10pro, build-kernel-opace2pro]
secrets: inherit
with:
model: "OP13"
soc: "sun"
branch: "oneplus/sm8750"
manifest: "JiuGeFaCai_oneplus_13_v.xml"
android_version: "android15"
kernel_version: "6.6"
build-kernel-opace5pro:
uses: ./.github/workflows/build.yml
# needs: [build-kernel-op11, build-kernel-op11r, build-kernel-opopen, build-kernel-opace2, build-kernel-op10t, build-kernel-op10pro, build-kernel-opace2pro]
secrets: inherit
with:
model: "OPAce5Pro"
soc: "sun"
branch: "oneplus/sm8750"
manifest: "JiuGeFaCai_oneplus_ace5_pro_v.xml"
android_version: "android15"
kernel_version: "6.6"
trigger-release:
runs-on: ubuntu-latest
needs:
# - build-kernel-op11
# - build-kernel-op11r
# - build-kernel-op12
# - build-kernel-op13r
# - build-kernel-opnord4
# - build-kernel-opopen
# - build-kernel-opace2
# - build-kernel-opace2pro
# - build-kernel-opace5
# - build-kernel-op10t
# - build-kernel-op10pro
- build-kernel-op13
- build-kernel-opace5pro
if: ${{ inputs.make_release }}
env:
REPO_OWNER: TheWildJames
REPO_NAME: OnePlus_KernelSU_SUSFS
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: "*TEST BUILD* OnePlus Kernels With KernelSU Next & SUSFS v1.5.5 *TEST BUILD*"
RELEASE_NOTES: |
This release contains KernelSU Next and SUSFS v1.5.5
Module:
-> https://github.com/sidex15/ksu_module_susfs
Non-Official Managers:
-> https://github.com/KernelSU-Next/KernelSU-Next
Features:
[+] KernelSU-Next
[+] SUSFS v1.5.5
[+] Wireguard Support
[+] Maphide LineageOS Detections
[+] Futile Maphide for jit-zygote-cache Detections
[+] Magic Mount Support
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v3
# Get the Latest Tag from GitHub
- name: Generate and Create New Tag
run: |
# Fetch the latest tag from GitHub (this is the latest tag based on the GitHub API)
LATEST_TAG=$(gh api repos/$REPO_OWNER/$REPO_NAME/tags --jq '.[0].name')
if [ -z "$LATEST_TAG" ]; then
LATEST_TAG="v1.5.5-r0" # Default to v1.5.3-0 if no tag exists
fi
# Increment the suffix (e.g., v1.5.3-0 becomes v1.5.3-1)
NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
# Output the new tag to be used
echo "New tag: $NEW_TAG"
# Set the new tag as an environment variable to be used in later steps
echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
# Create the tag in the repository
git tag $NEW_TAG
git push origin $NEW_TAG
# Download Artifacts for A12 (Only if A12 Build is successful or input is true or empty)
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ./downloaded-artifacts
# Create GitHub Release and upload files if make_release is true
- name: Create GitHub Release
uses: actions/create-release@v1
with:
tag_name: ${{ env.NEW_TAG }} # Use the generated tag for the release
prerelease: true # Mark the release as a pre-release
release_name: ${{ env.RELEASE_NAME }} # Pass the RELEASE_NAME to the action
body: ${{ env.RELEASE_NOTES }} # Pass the RELEASE_NOTES to the action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Assets Dynamically
run: |
# Loop through all files in the downloaded-artifacts directory
for file in ./downloaded-artifacts/kernel-*/*; do
# Skip directories
if [ -d "$file" ]; then
continue
fi
# Upload the file to the GitHub release
echo "Uploading $file..."
gh release upload ${{ env.NEW_TAG }} "$file"
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_TAG: ${{ env.NEW_TAG }}
# Display Files Uploaded
- name: Display Files Uploaded
run: |
echo "GitHub release created with the following files:"
ls ./downloaded-artifacts/**/*