name: Publish to Gitea Package Registry
on:
  push:
    tags:
      - 'v*'

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up JDK 25
        uses: actions/setup-java@v4
        with:
          java-version: '25'
          distribution: 'temurin'
      - name: Publish with Maven
        run: mvn --batch-mode clean deploy
        env:
          GITEA_TOKEN: ${{ secrets.EA_PUBLISH_TOKEN }}