2
0

android.yml 2.2 KB

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