name: "Compile"

on: [push, pull_request]

jobs:
  gradle:
    strategy:
      matrix:
        os: [ ubuntu-latest ]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          distribution: temurin
          java-version: 21

      - name: Setup Gradle
        uses: gradle/actions/setup-gradle@v4

      - name: Execute Gradle build
        run: ./gradlew build

      - name: Upload a Build Artifact
        uses: actions/upload-artifact@v4
        if: success()
        with:
          name: TerminatorPlus
          path: |
            build/libs/
            TerminatorPlus-API/build/libs
