support JPMS #29
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: Java CI | |
on: [push] | |
jobs: | |
build: | |
name: Build with Java ${{ matrix.jdk }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
jdk: ['11', '17', '21'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.jdk }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: ${{ matrix.jdk }} | |
cache: gradle | |
- name: Gradle Check | |
run: ./gradlew buildAll check | |
release: | |
name: Release | |
needs: build | |
if: ${{ needs.build.result == 'success' && contains('refs/heads/master', github.ref) }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 11 # release should always be done with min supported JDK | |
cache: gradle | |
- name: Publish Artifacts | |
run: ./gradlew publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |