name: Java CI

on:
  push:
    branches:
      - 'dev/0.6-forge'
      - 'dev/0.7-forge'
      - 'dev/0.8'
      - 'dev/0.9'
      - 'dev/0.10.0'
      - 'dev/0.11.0'
      - 'dev/0.12.0'
      - 'dev/1.0'
      - 'dev/1.1'
      - 'dev/1.2'
      - 'dev/1.3'
      - 'dev/1.4'
      - 'dev/1.5'
      - 'dev/1.6'

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - uses: gradle/wrapper-validation-action@v2
      - name: Set up JDK 17
        uses: actions/setup-java@v1
        with:
          java-version: 17
      - name: Upload to Maven
        run: ./gradlew publish --stacktrace
        env:
          MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
