name: Release
on: [workflow_dispatch] # Manual trigger
jobs:
  build:
    runs-on: ubuntu-24.04
    container:
      image: eclipse-temurin:21-jdk
      options: --user root
    steps:
      - uses: actions/checkout@v4
      - uses: gradle/actions/wrapper-validation@v4
      - run: ./gradlew checkVersion build publish --stacktrace
        env:
          MAVEN_URL: ${{ secrets.MAVEN_URL }}
          MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
          MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
          MAVEN_CENTRAL_URL: ${{ secrets.MAVEN_CENTRAL_URL }}
          MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
          MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
          SIGNING_SERVER: ${{ secrets.SIGNING_SERVER }}
          SIGNING_PGP_KEY: ${{ secrets.SIGNING_PGP_KEY }}