android.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. name: android
  2. # build on c/cpp changes or workflow changes
  3. on:
  4. push:
  5. paths:
  6. - 'lib/**.[ch]'
  7. - 'lib/**.cpp'
  8. - 'src/**.[ch]'
  9. - 'src/**.cpp'
  10. - 'irr/**.[ch]'
  11. - 'irr/**.cpp'
  12. - '**/CMakeLists.txt'
  13. - 'cmake/Modules/**'
  14. - 'po/**.po'
  15. - 'android/**'
  16. - '.github/workflows/android.yml'
  17. pull_request:
  18. paths:
  19. - 'lib/**.[ch]'
  20. - 'lib/**.cpp'
  21. - 'src/**.[ch]'
  22. - 'src/**.cpp'
  23. - 'irr/**.[ch]'
  24. - 'irr/**.cpp'
  25. - '**/CMakeLists.txt'
  26. - 'cmake/Modules/**'
  27. - 'po/**.po'
  28. - 'android/**'
  29. - '.github/workflows/android.yml'
  30. jobs:
  31. build:
  32. runs-on: ubuntu-22.04
  33. steps:
  34. - uses: actions/checkout@v4
  35. - name: Install deps
  36. run: |
  37. sudo apt-get update
  38. sudo apt-get install -y --no-install-recommends gettext
  39. - name: Set up JDK 17
  40. uses: actions/setup-java@v4
  41. with:
  42. distribution: 'temurin'
  43. java-version: '17'
  44. - name: Build AAB with Gradle
  45. # We build an AAB as well for uploading to the the Play Store.
  46. run: cd android; ./gradlew bundlerelease
  47. - name: Build APKs with Gradle
  48. # "assemblerelease" is very fast after "bundlerelease".
  49. run: cd android; ./gradlew assemblerelease
  50. - name: Save AAB artifact
  51. uses: actions/upload-artifact@v4
  52. with:
  53. name: Luanti-release.aab
  54. path: android/app/build/outputs/bundle/release/app-release.aab
  55. - name: Save armeabi artifact
  56. uses: actions/upload-artifact@v4
  57. with:
  58. name: Luanti-armeabi-v7a.apk
  59. path: android/app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk
  60. - name: Save arm64 artifact
  61. uses: actions/upload-artifact@v4
  62. with:
  63. name: Luanti-arm64-v8a.apk
  64. path: android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk
  65. - name: Save x86 artifact
  66. uses: actions/upload-artifact@v4
  67. with:
  68. name: Luanti-x86.apk
  69. path: android/app/build/outputs/apk/release/app-x86-release-unsigned.apk
  70. - name: Save x86_64 artifact
  71. uses: actions/upload-artifact@v4
  72. with:
  73. name: Luanti-x86_64.apk
  74. path: android/app/build/outputs/apk/release/app-x86_64-release-unsigned.apk