build.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. name: Build
  2. on:
  3. push:
  4. paths:
  5. - '.github/workflows/build.yml'
  6. - 'pom.xml'
  7. - 'src/**'
  8. pull_request_target:
  9. types: [labeled]
  10. env:
  11. JAVA_DIST: 'temurin'
  12. JAVA_VERSION: 24
  13. defaults:
  14. run:
  15. shell: bash
  16. jobs:
  17. test:
  18. name: Compile and Test
  19. runs-on: ubuntu-latest
  20. steps:
  21. - uses: actions/checkout@v4
  22. - uses: actions/setup-java@v4
  23. with:
  24. distribution: ${{ env.JAVA_DIST }}
  25. java-version: ${{ env.JAVA_VERSION }}
  26. cache: 'maven'
  27. - name: Cache SonarCloud packages
  28. uses: actions/cache@v4
  29. with:
  30. path: ~/.sonar/cache
  31. key: ${{ runner.os }}-sonar
  32. restore-keys: ${{ runner.os }}-sonar
  33. - name: Build and Test
  34. run: >
  35. xvfb-run
  36. mvn -B verify -Djavafx.platform=linux
  37. jacoco:report
  38. org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
  39. -Pcoverage
  40. -Dsonar.projectKey=cryptomator_cryptomator
  41. -Dsonar.organization=cryptomator
  42. -Dsonar.host.url=https://sonarcloud.io
  43. env:
  44. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
  45. SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
  46. - name: Draft a release
  47. if: startsWith(github.ref, 'refs/tags/')
  48. uses: softprops/action-gh-release@v2
  49. with:
  50. draft: true
  51. discussion_category_name: releases
  52. token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
  53. generate_release_notes: true
  54. body: |-
  55. :construction: Work in Progress
  56. ### What's New 🎉
  57. ### Bugfixes 🐛
  58. ### Other Changes 📎
  59. ---
  60. TODO FULL CHANGELOG
  61. 📜 List of closed issues is available [here](TODO)
  62. ---
  63. ⏳ Please be patient, the builds are still [running](https://github.com/cryptomator/cryptomator/actions). New versions of Cryptomator can be found here in a few moments. ⏳
  64. <!-- Don't forget to include the
  65. 💾 SHA-256 checksums of release artifacts:
  66. ```
  67. ```
  68. -->
  69. As usual, the GPG signatures can be checked using [our public key `5811 7AFA 1F85 B3EE C154 677D 615D 449F E6E6 A235`](https://gist.github.com/cryptobot/211111cf092037490275f39d408f461a).