Upgrade to Java 21 and Gradle 8.4 #489
Workflow file for this run
This file contains 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: build | |
on: | |
pull_request: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Java 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: corretto | |
java-version: 21 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build | |
run: ./gradlew projects clean build --no-daemon --refresh-dependencies | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
flags: unit-tests-${{ matrix.os }} | |
fail_ci_if_error: true | |
integration-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Java 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: corretto | |
java-version: 21 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Integration Test | |
run: ./gradlew projects clean integrationTest --no-daemon --refresh-dependencies | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
flags: integration-tests-${{ matrix.os }} | |
fail_ci_if_error: true | |
release: | |
needs: [ build, integration-test ] | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Bump version | |
id: version | |
uses: paulhatch/[email protected] | |
- name: Create GitHub tag and release | |
uses: softprops/[email protected] | |
with: | |
tag_name: ${{ steps.version.outputs.version_tag }} | |
generate_release_notes: true |