Update versions #31
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: Maven CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: | |
- 8 | |
- 11 | |
- 17 | |
- 21 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
cache: 'maven' | |
- name: Setup Git | |
run: > | |
git config --global user.email "actions@github.com" && | |
git config --global user.name "GitHub Actions" | |
if: ${{ !startsWith(github.event_name, 'pull_request') }} | |
- name: Build with Maven | |
run: mvn -B -V -e clean verify | |
- name: Deploy Site | |
if: ${{ matrix.java == '8' && github.event_name != 'release' && !startsWith(github.event_name, 'pull_request') }} | |
run: mvn -B -e site-deploy | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |