on: [ push ]

name: Build fabric mod

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

      - name: Set up JDK 21
        uses: actions/setup-java@v4
        with:
          java-version: '21'
          distribution: 'temurin'

      - name: Setup Gradle 8.12.1
        uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582
        with:
          gradle-version: '8.12.1'

      - name: Build with Gradle Wrapper
        run: chmod +x ./gradlew; ./gradlew build

      - name: Upload artifact
        uses: actions/upload-artifact@v3
        with:
          name: build
          path: build/libs/*