main.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: Android CI
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: set up JDK 1.8
  13. uses: actions/setup-java@v2
  14. with:
  15. java-version: 1.8
  16. distribution: 'adopt'
  17. - name: Install NDK
  18. run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;21.0.6113669" --sdk_root=${ANDROID_SDK_ROOT}
  19. - name: cache
  20. id: cache
  21. uses: actions/cache@v1
  22. with:
  23. path: ~/.gradle/caches
  24. key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
  25. restore-keys: |
  26. ${{ runner.os }}-gradle-
  27. - name: Build Debug APK
  28. run: |
  29. chmod +x gradlew
  30. ./gradlew assembleDebug
  31. - name: artifact
  32. uses: actions/upload-artifact@v1
  33. with:
  34. name: artifact
  35. path: app/build/outputs
  36. - name: Releasing using Hub
  37. uses: ShaunLWM/action-release-debugapk@master
  38. env:
  39. GITHUB_TOKEN: ${{ secrets.GITHUB_RElEASE_TOKEN }}
  40. APP_FOLDER: app
  41. RELEASE_TITLE: Version