From 48ff1a64e99fd37ec701bc96abb08de09382bdbe Mon Sep 17 00:00:00 2001 From: nk-coding Date: Thu, 27 Jun 2024 17:44:12 +0200 Subject: [PATCH] next try --- .github/workflows/releaseToMavenCentral.yml | 12 +++++------ pom.xml | 20 +++++++++++++++++++ .../internalOrCiOnly/deploySettings.xml | 13 ------------ 3 files changed, 26 insertions(+), 19 deletions(-) delete mode 100644 scriptsAndTools/internalOrCiOnly/deploySettings.xml diff --git a/.github/workflows/releaseToMavenCentral.yml b/.github/workflows/releaseToMavenCentral.yml index 13efe846..e3823e7f 100644 --- a/.github/workflows/releaseToMavenCentral.yml +++ b/.github/workflows/releaseToMavenCentral.yml @@ -12,11 +12,11 @@ jobs: with: java-version: '11' distribution: 'temurin' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file + server-id: central + server-username: ${{ secrets.MAVEN_CENTRAL_USER }} + server-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + gpg-private-key: ${{ secrets.MAVEN_CENTRAL_GPG_PRIVATE_KEY }} + gpg-passphrase: ${{ secrets.MAVEN_CENTRAL_GPG_PASSPHRASE }} - name: Publish package - run: ./mvnw -s "${{ github.workspace }}/scriptsAndTools/internalOrCiOnly/deploySettings.xml" deploy -Dcentral.user=$MAVEN_CENTRAL_USER -Dcentral.password=$MAVEN_CENTRAL_PASSWORD - env: - MAVEN_CENTRAL_USER: ${{ secrets.MAVEN_CENTRAL_USER }} - MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + run: ./mvnw deploy diff --git a/pom.xml b/pom.xml index 03df724d..31a8192e 100644 --- a/pom.xml +++ b/pom.xml @@ -87,6 +87,26 @@ + + org.apache.maven.plugins + maven-gpg-plugin + 3.1.0 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + net.revelc.code.formatter formatter-maven-plugin diff --git a/scriptsAndTools/internalOrCiOnly/deploySettings.xml b/scriptsAndTools/internalOrCiOnly/deploySettings.xml deleted file mode 100644 index 39bd1183..00000000 --- a/scriptsAndTools/internalOrCiOnly/deploySettings.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - central - ${central.user} - ${central.password} - - -