-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (50 loc) · 1.89 KB
/
main.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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 0 1,15 * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
# Install dependencies
- name: Set up Build Environment
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip openjdk-11-jdk
pip install --upgrade buildozer
- name: Install Android SDK
run: |
mkdir -p $HOME/android-sdk
curl -o sdk-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
unzip -q sdk-tools.zip -d $HOME/android-sdk
rm sdk-tools.zip
export ANDROID_HOME=$HOME/android-sdk
export PATH=$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH
# Install the required Android SDK packages, including build-tools and platform
yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME --licenses
$ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME "platform-tools" "build-tools;33.0.2" "platforms;android-33"
$ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME "build-tools;36.0.0-rc1" # Ensure the specific build tools version
- name: Check that aidl is available
run: |
if ! command -v aidl &> /dev/null; then
echo "Aidl not found, please install it."
exit 1
else
echo "Aidl found."
fi
- name: Build with Buildozer
uses: ArtemSBulgakov/buildozer-action@v1
with:
command: buildozer android debug
buildozer_version: master
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: AndroidBuild
path: bin/*.apk