build: simplify GitHub Action build #4435
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: Full Build | |
| on: | |
| push: | |
| branches: | |
| - main # Only run push on main (merges/direct pushes) | |
| tags: | |
| - 'v*' # Triggers on any tag starting with 'v' (e.g., v1.0, v2.1.3) | |
| pull_request: | |
| branches: | |
| - main # Run on any PR targeting main | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| java-version: [21] | |
| include: | |
| - os: ubuntu-latest | |
| java-version: 25 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up JDK ${{ matrix.java-version }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build | |
| run: mvn -B install -P gradlePlugin --no-transfer-progress | |
| env: | |
| BUILD_LOG_LEVEL: 'ERROR' | |
| - name: Tests | |
| uses: mikepenz/action-junit-report@v5 | |
| if: always() | |
| with: | |
| check_name: Test ${{ matrix.os }} ${{ matrix.java-version }} | |
| report_paths: '*/target/*/TEST-*.xml' |