diff --git a/.github/workflows/merge-build.yml b/.github/workflows/merge-build.yml index 43ac792..d5797c6 100644 --- a/.github/workflows/merge-build.yml +++ b/.github/workflows/merge-build.yml @@ -27,6 +27,7 @@ on: paths: - 'src/**' - 'pom.xml' + - '.github/workflows/merge-build.yml' jobs: publish-snapshot: @@ -47,19 +48,24 @@ jobs: architecture: x64 java-version: 17 - - name: maven-settings-xml-action - uses: whelk-io/maven-settings-xml-action@v22 - if: ${{ github.event.repository.fork == false }} + - uses: s4u/maven-settings-action@v4.0.0 with: - repositories: '[{ "id": "sonatype", "url": "https://oss.sonatype.org/content/repositories/snapshots/", "releases": {"enabled": "false"}, "snapshots": {"enabled": "true" }}]' - servers: '[{ "id": "sonatype", "username": "${{ secrets.SONATYPE_BOT_USERNAME}}", "password": "${{ secrets.SONATYPE_BOT_TOKEN}}" }]' + sonatypeSnapshots: true - - name: "Maven Build & Deploy Snapshot to Sonatype OSSRH" - if: ${{ github.event.repository.fork == false }} - - run: mvn -B -e deploy -DaltDeploymentRepository=sonatype::default::https://oss.sonatype.org/content/repositories/snapshots/ + - uses: s4u/maven-settings-action@v4.0.0 + with: + sonatypeSnapshots: true - - name: "Maven Build" - if: ${{ github.event.repository.fork == true }} + - uses: s4u/maven-settings-action@v4.0.0 + if: ${{ github.event_name == 'push' }} + with: + servers: | + [{ + "id": "central-portal-snapshots", + "username": "${{ secrets.SONATYPE_BOT_USERNAME }}", + "password": "${{ secrets.SONATYPE_BOT_TOKEN }}" + }] - run: mvn -B -e -Prun-its verify + - name: "Maven Build & Deploy Snapshot to Sonatype OSSRH" + if: ${{ github.event_name == 'push' }} + run: mvn -B -e deploy -DaltDeploymentRepository=sonatype::default::https://oss.sonatype.org/content/repositories/snapshots/