-
Notifications
You must be signed in to change notification settings - Fork 47
146 lines (121 loc) · 4.35 KB
/
development.yml
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
name: Development Build (Galaxy A50)
on:
workflow_dispatch:
push:
branches:
- "wip-*"
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
type:
[
oneui-12-e,
oneui-12-p,
oneui-11-e,
oneui-11-p,
aosp-12-e,
aosp-12-p,
aosp-11-e,
aosp-11-p,
]
steps:
- uses: actions/checkout@v3
- uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Asia/Manila"
timezoneMacos: "Asia/Manila"
timezoneWindows: "Philippine Standard Time"
- name: Export build branch
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
id: branch_name
- name: Update Debian/Ubuntu Repositories
run: sudo apt-get update
- name: Install Debian/Ubuntu dependencies
run: sudo apt-get install bzip2 lib32stdc++6 libc6-dev-i386 libncurses5 jq -y
- name: Parse build arguments
run: |
echo "VARIANT=$(echo ${{ matrix.type }} | cut -d '-' -f1)" >> $GITHUB_ENV
echo "ANDROID=$(echo ${{ matrix.type }} | cut -d '-' -f2)" >> $GITHUB_ENV
echo "SELINUX=$(echo ${{ matrix.type }} | cut -d '-' -f3)" >> $GITHUB_ENV
- name: Build Mint kernel (No-Root)
run: |
set -eo pipefail
echo " I: Building Mint kernel ${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER}"
./build.sh --automated --device a50 --variant $VARIANT --android $ANDROID -$SELINUX
- name: Upload kernel image artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type }} Kernel Image (No-Root)
path: "out/boot.img"
if-no-files-found: error
- name: Build Mint kernel (KernelSU)
run: |
set -eo pipefail
echo " I: Building Mint kernel ${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER}"
./build.sh --automated --device a50 --variant $VARIANT --android $ANDROID -$SELINUX --kernelsu
- name: Upload kernel image artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type }} Kernel Image (KernelSU)
path: "out/boot.img"
if-no-files-found: error
- name: Prepare release package
run: |
mkdir -p ./release
mv -f `find ./out -iname "MintBeta-*.zip"` ./release/
- name: Prepare build config artifact
run: cp .config ./release/kernel_config_a50_$VARIANT-$ANDROID-$SELINUX.txt
- name: Upload release package
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type }} Release
path: "release"
if-no-files-found: error
- name: Upload build config artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type }} Kernel Configs
path: release/kernel_config_a50_${{ env.VARIANT }}-${{ env.ANDROID }}-${{ env.SELINUX }}.txt
if-no-files-found: error
release:
name: Release files and configs
if: ${{ !contains(github.event.head_commit.message, '[skip rel]') }}
needs: build
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v3
- uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Asia/Manila"
timezoneMacos: "Asia/Manila"
timezoneWindows: "Philippine Standard Time"
- name: Merge releases
run: |
set -eo pipefail
gh run download "$GITHUB_RUN_ID" -p "*Release" --dir ./release
find ./release -mindepth 2 -type f -exec mv {} ./release \;
- name: Delete build configs and release directories
run: |
set -eo pipefail
rm -f ./release/kernel_config_*.txt
rm -rf ./release/aosp-* ./release/oneui-*
- name: Delete older release
uses: dev-drprasad/delete-older-releases@v0.2.0
with:
keep_latest: 12
delete_tag_pattern: "xbeta"
- name: Upload release
uses: Hs1r1us/Release-AIO@v1.0
with:
tag_name: xbeta-${{ github.run_number }}_a50dx
prerelease: true
release_name: Galaxy A50 (beta-${{ github.run_number }})
body_path: "./tools/make/release/a50-development.md"
asset_files: "./release"