Update build.yml #30
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: Build APK (Ant) | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 8 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 8 | |
| distribution: temurin | |
| - name: Install Ant | |
| run: sudo apt-get install -y ant | |
| - name: Install Android SDK (legacy) | |
| run: | | |
| wget https://dl.google.com/android/repository/tools_r25.2.5-linux.zip -O sdk-tools.zip | |
| unzip -q sdk-tools.zip -d $HOME/android-sdk | |
| export ANDROID_HOME=$HOME/android-sdk | |
| echo "sdk.dir=$ANDROID_HOME" > ant.properties | |
| echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV | |
| echo "$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools" >> $GITHUB_PATH | |
| # instalar Google APIs nivel 15 | |
| yes | $ANDROID_HOME/tools/android update sdk --no-ui --all --filter "addon-google_apis-google-15" | |
| - name: Build APK with Ant | |
| run: | | |
| export ANDROID_HOME=$HOME/android-sdk | |
| ant debug | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DroidVncServer-APK | |
| path: bin/*.apk |