android.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. - 'android/**'
  11. - '.github/workflows/android.yml'
  12. pull_request:
  13. paths:
  14. - 'lib/**.[ch]'
  15. - 'lib/**.cpp'
  16. - 'src/**.[ch]'
  17. - 'src/**.cpp'
  18. - 'android/**'
  19. - '.github/workflows/android.yml'
  20. jobs:
  21. build:
  22. runs-on: ubuntu-20.04
  23. steps:
  24. - uses: actions/checkout@v3
  25. - name: Install deps
  26. run: |
  27. sudo apt-get update
  28. sudo apt-get install -y --no-install-recommends gettext openjdk-11-jdk-headless
  29. - name: Build with Gradle
  30. run: cd android; ./gradlew assemblerelease
  31. - name: Save armeabi artifact
  32. uses: actions/upload-artifact@v3
  33. with:
  34. name: Minetest-armeabi-v7a.apk
  35. path: android/app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk
  36. - name: Save arm64 artifact
  37. uses: actions/upload-artifact@v3
  38. with:
  39. name: Minetest-arm64-v8a.apk
  40. path: android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk
  41. - name: Save x86 artifact
  42. uses: actions/upload-artifact@v3
  43. with:
  44. name: Minetest-x86.apk
  45. path: android/app/build/outputs/apk/release/app-x86-release-unsigned.apk
  46. - name: Save x86_64 artifact
  47. uses: actions/upload-artifact@v3
  48. with:
  49. name: Minetest-x86_64.apk
  50. path: android/app/build/outputs/apk/release/app-x86_64-release-unsigned.apk