From c050fb3bc0730bf1ff260413f22661c10d0700bc Mon Sep 17 00:00:00 2001 From: Gang Li Date: Tue, 17 Mar 2026 11:58:34 +0800 Subject: [PATCH] Revert sonatype settings in github action --- .github/workflows/maven-push.yml | 21 ++++++++++++++------- .github/workflows/maven-verify.yml | 6 ++---- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/maven-push.yml b/.github/workflows/maven-push.yml index 1f940f3..686e9db 100644 --- a/.github/workflows/maven-push.yml +++ b/.github/workflows/maven-push.yml @@ -31,20 +31,27 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Set up JDK 11 for x64 + - name: Set up JDK uses: actions/setup-java@v5 with: java-version: '17' distribution: 'temurin' architecture: x64 - - name: maven-settings-xml-action - uses: whelk-io/maven-settings-xml-action@v22 - if: ${{ github.event.repository.fork == false }} + - uses: s4u/maven-settings-action@v2.8.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 + + - uses: s4u/maven-settings-action@v2.8.0 + if: ${{ github.event_name == 'push' }} + with: + servers: | + [{ + "id": "central-portal-snapshots", + "username": "${{ secrets.SONATYPE_BOT_USERNAME }}", + "password": "${{ secrets.SONATYPE_BOT_TOKEN }}" + }] + - name: Deploy the artifact if: ${{ github.event_name == 'push' }} run: mvn help:effective-settings -B -V clean deploy -e \ No newline at end of file diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml index 76c1652..f038584 100644 --- a/.github/workflows/maven-verify.yml +++ b/.github/workflows/maven-verify.yml @@ -34,11 +34,9 @@ jobs: distribution: 'temurin' architecture: x64 - - name: maven-settings-xml-action - uses: whelk-io/maven-settings-xml-action@v22 + - uses: s4u/maven-settings-action@v2.8.0 with: - repositories: '[{ "id": "sonatype", "url": "https://oss.sonatype.org/content/repositories/snapshots/", "releases": {"enabled": "false"}, "snapshots": {"enabled": "true" }}]' - + sonatypeSnapshots: true - name: Build the Maven verify phase run: mvn -B -V clean verify -Prun-its -Pci