android.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. name: Android CI
  2. on:
  3. push:
  4. branches: [ as ]
  5. pull_request:
  6. branches: [ as ]
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v3
  12. - name: set up JDK 17
  13. uses: actions/setup-java@v1
  14. with:
  15. java-version: 17
  16. - name: Gradle cache
  17. id: cache
  18. uses: actions/cache@v2
  19. with:
  20. path: |
  21. ~/.gradle/
  22. ~/.gradle/wrapper
  23. key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
  24. restore-keys: |
  25. ${{ runner.os }}-gradle-
  26. - name: Build Debug APK
  27. run: |
  28. ./gradlew assembleDebug
  29. ./gradlew bundleRelease
  30. # - name: Upload app bundle as artifact
  31. # uses: actions/upload-artifact@v2
  32. # with:
  33. # name: app-bundle
  34. # path: app/build/outputs/bundle/release/app-release.aab
  35. # https://github.com/marketplace/actions/upload-android-release-to-play-store
  36. uses: r0adkll/upload-google-play@v1
  37. with:
  38. serviceAccountJsonPlainText: ${{ SERVICE_ACCOUNT_JSON }}
  39. packageName: me.yoqi.qrcode
  40. releaseFiles: app/build/outputs/bundle/release/app-release.aab
  41. track: production
  42. status: inProgress
  43. # inAppUpdatePriority: 2
  44. userFraction: 0.99
  45. # whatsNewDirectory: distribution/whatsnew
  46. # mappingFile: app/build/outputs/mapping/release/mapping.txt
  47. # debugSymbols: app/intermediates/merged_native_libs/release/out/lib
  48. # - name: Notify slack success
  49. # uses: craftech-io/slack-action@v1
  50. # with:
  51. # slack_webhook_url: ${{ secrets.SLACK_NOTIFY }}
  52. # slack_channel: pipeline-ci-cd
  53. # status: ${{ job.status }}
  54. # if: always()