# Automatically build the project and run any configured tests for every push # and submitted pull request. This can help catch issues that only occur on # certain platforms or Java versions, and provides a first line of defence # against bad commits. name: build on: [pull_request, push] jobs: build: strategy: matrix: # Use these Java versions java: [ 21, # Current Java LTS ] runs-on: ubuntu-22.04 container: image: "git.euph.dev/actions/runner-java-21:latest" steps: - name: Checkout uses: https://git.euph.dev/actions/checkout@v3 - name: build run: ./gradlew build - name: capture build artifacts if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java uses: actions/upload-artifact@v4 with: name: Artifacts path: build/libs/