bintray.yml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # This is a basic workflow to help you get started with Actions
  2. name: Bintray Publish
  3. # Controls when the action will run. Triggers the workflow on push or pull request
  4. # events but only for the master branch
  5. on:
  6. release:
  7. types: [ created, prereleased ]
  8. push:
  9. tags:
  10. - '*-dev*'
  11. # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  12. jobs:
  13. # This workflow contains a single job called "build"
  14. build:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v2
  18. - name: Set up JDK 1.8
  19. uses: actions/setup-java@v1
  20. with:
  21. java-version: 1.8
  22. - name: Grant execute permission for gradlew
  23. run: chmod +x gradlew
  24. - name: Gradle clean
  25. run: ./gradlew clean
  26. - name: Gradle build
  27. run: ./gradlew build # if test's failed, don't publish
  28. - name: Check keys
  29. run: >
  30. ./gradlew :mirai-core-utils:ensureBintrayAvailable
  31. :mirai-core-api:ensureBintrayAvailable
  32. :mirai-core:ensureBintrayAvailable
  33. -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }}
  34. -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
  35. - name: Gradle :mirai-core-utils:publish
  36. run: >
  37. ./gradlew :mirai-core-utils:publish --info
  38. -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }}
  39. -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
  40. - name: Gradle :mirai-core-api:publish
  41. run: >
  42. ./gradlew :mirai-core-api:publish --info
  43. -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }}
  44. -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
  45. - name: Gradle :mirai-core:publish
  46. run: >
  47. ./gradlew :mirai-core:publish --info
  48. -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }}
  49. -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
  50. - name: Gradle :mirai-core-all:bintrayUpload
  51. run: >
  52. ./gradlew :mirai-core-all:bintrayUpload --info
  53. -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }}
  54. -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
  55. # - name: Upload artifact
  56. # uses: actions/[email protected]
  57. # with:
  58. # # Artifact name
  59. # name: mirai-core
  60. # # Directory containing files to upload
  61. # path: "mirai-core/build/libs/mirai-core-*-all.jar"
  62. # - name: Upload artifact
  63. # uses: actions/[email protected]
  64. # with:
  65. # # Artifact name
  66. # name: mirai-core-qqandroid-all
  67. # # Directory containing files to upload
  68. # path: "mirai-core-qqandroid/build/libs/mirai-core-qqandroid-*-all.jar"