diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 8297395b..e3c0958d 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -48,9 +48,14 @@ jobs: key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- - - - name: Build and deploy with Maven + + - name: Publish to the Maven Central Repository run: mvn --batch-mode --update-snapshots deploy + if: matrix.Java == 11 env: MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + + - name: Maven Build + run: mvn --batch-mode --update-snapshots install + if: matrix.Java != 11