Update main.yml #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Kivy APK | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the code | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# Step 2: Set up Python | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.12.3 # Use a valid Python version | |
# Step 3: Install Buildozer and dependencies | |
- name: Install Buildozer | |
run: | | |
sudo apt update | |
sudo apt install -y python3-pip python3-setuptools git zip openjdk-11-jdk | |
pip install --upgrade pip | |
pip install buildozer cython | |
# Step 4: Build the APK | |
- name: Build APK | |
run: | | |
buildozer -v android debug | |
# Step 5: Upload APK as an artifact | |
- name: Upload APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: kivy-app-debug.apk | |
path: bin/*.apk |