name: Maven release on: push: branches: - main jobs: build: runs-on: docker steps: - uses: actions/checkout@v2 - name: Set up JDK uses: https://github.com/actions/setup-java@v1 with: java-version: 17 - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build and publish with gradle uses: https://github.com/gradle/gradle-build-action@v2 with: arguments: publish env: MAVEN_URL: ${{ secrets.MAVEN_URL }} MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}