From e3352e9787cca2ee8082e3b67feabd4603f309ff Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Tue, 17 Sep 2024 13:57:25 +0200 Subject: [PATCH] Improved actions --- .github/workflows/maven.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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