Update android_build.yml #5
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: Android Build | |
on: | |
push: | |
branches: | |
- master # Change this to your main branch name (e.g., master) | |
- dev | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: '18' # Change this to the required Java version for your Android project | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: 7.4.2 | |
- name: Setup Android NDK | |
uses: nttld/[email protected] | |
with: | |
ndk-version: r14b | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Build APK | |
run: ./gradlew assembleDebug # Change 'assembleDebug' to 'assembleRelease' if you want a release build | |
- name: Upload APK artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: app-debug # Change this to your desired artifact name | |
path: ./app/build/outputs/apk/debug/LSLRecorder-1.0.0-debug.apk |