diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index fa1fe40b..f54eb6ae 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -3,78 +3,57 @@ name: Android Build on: push: branches: - - master # Change this to your main branch name (e.g., master) - - dev + - '**' # Trigger on push to any branch + jobs: build-debug: - name: Build debug + # Build debug APK for all feature branches --> and not master + if: github.ref_name != 'master' runs-on: ubuntu-latest - if: github.ref =='refs/heads/dev' - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup JDK - uses: actions/setup-java@v3 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: '17' - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: 7.4.2 - - - name: Setup Android NDK - uses: nttld/setup-ndk@v1.2.0 - with: - ndk-version: r25c - - - name: Grant execute permission for gradlew - run: chmod +x ./gradlew + - uses: gradle/actions/setup-gradle@v4 + with: { gradle-version: 7.4.2 } + - uses: nttld/setup-ndk@v1.2.0 + with: { ndk-version: r25c } + - run: chmod +x ./gradlew - name: Build debug APK run: ./gradlew assembleDebug - - name: Upload APK artifact + - name: Upload debug APK uses: actions/upload-artifact@v4 with: - name: RECORDA-debug # Change this to your desired artifact name - path: ./app/build/outputs/apk/debug/*.apk + name: RECORDA-debug + path: app/build/outputs/apk/debug/*.apk - build-master: - name: Build master + build-release: + # Build release APK ONLY for master branch + if: github.ref_name == 'master' runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup JDK - uses: actions/setup-java@v3 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: temurin - java-version: '17' # Change this to the required Java version for your Android project - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: 7.4.2 - - - name: Setup Android NDK - uses: nttld/setup-ndk@v1.2.0 - with: - ndk-version: r25c - - - name: Grant execute permission for gradlew - run: chmod +x ./gradlew + java-version: '17' + - uses: gradle/actions/setup-gradle@v4 + with: { gradle-version: 7.4.2 } + - uses: nttld/setup-ndk@v1.2.0 + with: { ndk-version: r25c } + - run: chmod +x ./gradlew - name: Build release APK run: ./gradlew assembleRelease - name: Sign app APK uses: r0adkll/sign-android-release@v1 - # ID used to access action output id: sign_app with: releaseDirectory: app/build/outputs/apk/release @@ -83,11 +62,10 @@ jobs: keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} env: - # override default build-tools version (33.0.0) -- optional BUILD_TOOLS_VERSION: "34.0.0" - - name: Upload APK artifact + + - name: Upload release APK uses: actions/upload-artifact@v4 with: - name: RECORDA-release # Change this to your desired artifact name - path: ${{steps.sign_app.outputs.signedReleaseFile}} # Change the path to the location of your APK file - + name: RECORDA-release + path: ${{ steps.sign_app.outputs.signedReleaseFile }} diff --git a/.gitignore b/.gitignore index c964fd95..7a9c4c48 100755 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ output.json obj/ .externalNativeBuild app/.cxx/ +/TODO.md diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 8dbfdc61..ff58b59e 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,10 +4,9 @@