Update main.yml #5
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| # 1. Instalar dependencias del sistema (las mismas que daban guerra en Colab) | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential libtool libtool-bin autoconf automake \ | |
| libffi-dev libssl-dev python3-dev \ | |
| libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev \ | |
| libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev \ | |
| zlib1g-dev openjdk-17-jdk unzip zip \ | |
| libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good | |
| # 2. Instalar Buildozer | |
| - name: Install Buildozer | |
| run: | | |
| pip install --upgrade pip | |
| pip install buildozer cython==0.29.33 | |
| # 3. Construir la APK (aceptando licencias automáticamente) | |
| - name: Build APK | |
| run: | | |
| yes | buildozer android debug | |
| # 4. Subir el resultado | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: snake-game-apk | |
| path: bin/*.apk |