gradle.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # This workflow uses actions that are not certified by GitHub.
  2. # They are provided by a third-party and are governed by
  3. # separate terms of service, privacy policy, and support
  4. # documentation.
  5. # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
  6. # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
  7. name: Java CI with Gradle
  8. on:
  9. push:
  10. branches: [ "3.0" ]
  11. pull_request:
  12. branches: [ "3.0" ]
  13. jobs:
  14. build:
  15. runs-on: ubuntu-latest
  16. permissions:
  17. contents: read
  18. steps:
  19. - uses: actions/checkout@v4
  20. - name: Set up JDK 21
  21. uses: actions/setup-java@v4
  22. with:
  23. java-version: '21'
  24. distribution: 'temurin'
  25. # Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
  26. # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
  27. - name: Setup Gradle
  28. uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
  29. - name: Build with Gradle Wrapper
  30. run: ./gradlew build
  31. # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
  32. # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
  33. #
  34. # - name: Setup Gradle
  35. # uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
  36. # with:
  37. # gradle-version: '8.5'
  38. #
  39. # - name: Build with Gradle 8.5
  40. # run: gradle build
  41. dependency-submission:
  42. runs-on: ubuntu-latest
  43. permissions:
  44. contents: write
  45. steps:
  46. - uses: actions/checkout@v4
  47. - name: Set up JDK 21
  48. uses: actions/setup-java@v4
  49. with:
  50. java-version: '21'
  51. distribution: 'temurin'
  52. # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
  53. # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
  54. - name: Generate and submit dependency graph
  55. uses: gradle/actions/dependency-submission@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0