name: Gradle Build

on:
  pull_request:
    branches: [ master ]
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3

    - name: Set up JDK
      uses: actions/setup-java@v3
      with:
        java-version: '17'
        distribution: 'temurin'
        server-id: github

    - name: Setup Gradle
      uses: gradle/gradle-build-action@v2

    - name: Build with Gradle
      run: |
        mkdir data
        ./gradlew build
