cui.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # This is a basic workflow to help you get started with Actions
  2. name: CuiCloud 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: Gradle :mirai-core:cuiCloudUpload
  27. run: ./gradlew :mirai-core:cuiCloudUpload -Dcui_cloud_key=${{ secrets.CUI_CLOUD_KEY }} -Pcui_cloud_key=${{ secrets.CUI_CLOUD_KEY }} -Dcui_cloud_url=${{ secrets.CUI_CLOUD_URL }} -Pcui_cloud_url=${{ secrets.CUI_CLOUD_URL }}
  28. - name: Gradle :mirai-core-qqandroid:cuiCloudUpload
  29. run: ./gradlew :mirai-core-qqandroid:cuiCloudUpload -Dcui_cloud_key=${{ secrets.CUI_CLOUD_KEY }} -Pcui_cloud_key=${{ secrets.CUI_CLOUD_KEY }} -Dcui_cloud_url=${{ secrets.CUI_CLOUD_URL }} -Pcui_cloud_url=${{ secrets.CUI_CLOUD_URL }}
  30. # - name: Upload artifact
  31. # uses: actions/[email protected]
  32. # with:
  33. # # Artifact name
  34. # name: mirai-core
  35. # # Directory containing files to upload
  36. # path: "mirai-core/build/libs/mirai-core-*-all.jar"
  37. # - name: Upload artifact
  38. # uses: actions/[email protected]
  39. # with:
  40. # # Artifact name
  41. # name: mirai-core-qqandroid-all
  42. # # Directory containing files to upload
  43. # path: "mirai-core-qqandroid/build/libs/mirai-core-qqandroid-*-all.jar"