diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..f406e87ad --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,50 @@ +# 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: + paths-ignore: + - '**.md' + - '.gitignore' + - 'docs/**' + push: + paths-ignore: + - '**.md' + - '.gitignore' + - 'docs/**' + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + - name: checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 1 + + - name: validate gradle wrapper + uses: gradle/actions/wrapper-validation@v4 + + - name: setup jdk and cache gradle + uses: actions/setup-java@v5 + with: + java-version: '25' + distribution: 'microsoft' + cache: 'gradle' + + - name: make gradle wrapper executable + run: chmod +x ./gradlew + + - name: build + run: ./gradlew build --no-daemon --build-cache + + - name: capture build artifacts + if: success() + uses: actions/upload-artifact@v7 + with: + name: Artifacts + path: build/libs/*.jar + if-no-files-found: ignore