build(gradle): revert to gradle 8 to preserve jdk 8 support #645
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macos-latest | |
| jdk: | |
| - "17" | |
| - "25" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK ${{ matrix.jdk }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ matrix.jdk }} | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Build, verify and bundle | |
| run: ./gradlew --no-daemon clean check bundle | |
| - name: Prepare CI diagnostics artifact | |
| if: always() | |
| shell: bash | |
| run: | | |
| { | |
| echo "Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| echo "Job: ${{ github.job }}" | |
| echo "OS: ${{ matrix.os }}" | |
| echo "JDK: ${{ matrix.jdk }}" | |
| echo "SHA: ${{ github.sha }}" | |
| } > ./build/reports/ci-info.txt | |
| - name: Upload test reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports-${{ matrix.os }}-jdk${{ matrix.jdk }}-${{ github.sha }} | |
| if-no-files-found: warn | |
| path: | | |
| ./build/reports/ci-info.txt | |
| **/build/reports/**/* | |
| **/build/test-results/**/* | |
| - name: Upload bundle artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: software-challenge-backend-${{ matrix.os }}-jdk${{ matrix.jdk }}-${{ github.sha }} | |
| path: | | |
| build/bundle/*.zip | |
| build/bundle/*.jar | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: software-challenge-backend-*-${{ github.sha }} | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Release ${{ github.ref }} | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: artifacts/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |