diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index f8533fe6..6187f369 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -4,7 +4,7 @@ on: watch: types: [started] pull_request: - types: [opened, reopened, edited] + types: [opened, reopened, edited, synchronize, ready_for_review] push: branches: - main @@ -29,6 +29,15 @@ jobs: architecture: x64 - uses: s4u/maven-settings-action@v2.8.0 + with: + sonatypeSnapshots: true + + - name: Build the Maven verify phase + run: mvn -B -V clean verify -Prun-its -Pci + + + - uses: s4u/maven-settings-action@v2.8.0 + if: ${{ github.event_name == 'push' }} with: servers: | [{ @@ -37,8 +46,6 @@ jobs: "password": "${{ secrets.SONATYPE_BOT_TOKEN }}" }] - - name: Build the Maven verify phase - run: mvn -B -V clean verify -Prun-its -Pci - - name: Deploy the artifact + if: ${{ github.event_name == 'push' }} run: mvn help:effective-settings -B -V clean deploy -e