2
0

bintray.yml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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:
  8. - created
  9. # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  10. jobs:
  11. # This workflow contains a single job called "build"
  12. build:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - uses: actions/checkout@v2
  16. - name: Set up JDK 1.8
  17. uses: actions/setup-java@v1
  18. with:
  19. java-version: 1.8
  20. - name: Grant execute permission for gradlew
  21. run: chmod +x gradlew
  22. - name: Gradle clean
  23. run: ./gradlew clean
  24. - name: Gradle build
  25. run: ./gradlew build # if test's failed, don't publish
  26. - name: Check keys
  27. run: ./gradlew :mirai-core:ensureBintrayAvailable :mirai-core-qqandroid:ensureBintrayAvailable -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
  28. - name: Gradle :mirai-core:bintrayUpload
  29. run: ./gradlew :mirai-core:bintrayUpload -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
  30. - name: Gradle :mirai-core-qqandroid:bintrayUpload
  31. run: ./gradlew :mirai-core-qqandroid:bintrayUpload -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
  32. - name: Gradle :mirai-serialization:bintrayUpload
  33. run: ./gradlew :mirai-serialization:bintrayUpload -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
  34. # - name: Upload artifact
  35. # uses: actions/[email protected]
  36. # with:
  37. # # Artifact name
  38. # name: mirai-core
  39. # # Directory containing files to upload
  40. # path: "mirai-core/build/libs/mirai-core-*-all.jar"
  41. # - name: Upload artifact
  42. # uses: actions/[email protected]
  43. # with:
  44. # # Artifact name
  45. # name: mirai-core-qqandroid-all
  46. # # Directory containing files to upload
  47. # path: "mirai-core-qqandroid/build/libs/mirai-core-qqandroid-*-all.jar"