From 5485f9c37b02532b468e4e65bb9e230e60c5c5fb Mon Sep 17 00:00:00 2001 From: Jothi Prakash Date: Mon, 4 Aug 2025 21:38:24 +0530 Subject: [PATCH 1/6] Updated the github action to publish --- .github/workflows/release.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c47abd3dd..d37e28e775 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,11 @@ on: tags: - 'v*' workflow_dispatch: + inputs: + release_tag: + description: 'v1.0.8-oss' + required: true + jobs: publish: @@ -18,14 +23,14 @@ jobs: uses: actions/setup-java@v4 env: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_CENTRAL_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} with: java-version: 11 server-id: ossrh distribution: "adopt" - server-username: OSSRH_USERNAME - server-password: OSSRH_PASSWORD + server-username: MAVEN_CENTRAL_USERNAME + server-password: MAVEN_CENTRAL_PASSWORD gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} gpg-passphrase: GPG_PASSPHRASE @@ -33,8 +38,8 @@ jobs: run: mvn -Prelease --batch-mode deploy -Dnvd.api.key=${{ secrets.NVD_API_KEY }} env: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_CENTRAL_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - name: Create GitHub release uses: softprops/action-gh-release@v1 From 4015c747ba390c989835b849f02d75c02ef7ec4c Mon Sep 17 00:00:00 2001 From: Jothi Prakash Date: Mon, 4 Aug 2025 21:41:07 +0530 Subject: [PATCH 2/6] nit --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d37e28e775..3763cd8d8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: MAVEN_CENTRAL_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} with: java-version: 11 - server-id: ossrh + server-id: central distribution: "adopt" server-username: MAVEN_CENTRAL_USERNAME server-password: MAVEN_CENTRAL_PASSWORD From 396b0ed9b1602d8f8deab164561268def86c6930 Mon Sep 17 00:00:00 2001 From: Jothi Prakash Date: Mon, 4 Aug 2025 21:43:40 +0530 Subject: [PATCH 3/6] some syntax changes --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3763cd8d8b..86eaeb8513 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.release_tag }} - name: Set up Java for publishing to Maven Central Repository uses: actions/setup-java@v4 From 0022451e54ab4d87e69b5a25c7c4caee4471a2bb Mon Sep 17 00:00:00 2001 From: Jothi Prakash Date: Mon, 4 Aug 2025 21:56:51 +0530 Subject: [PATCH 4/6] minor change --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86eaeb8513..19f781bd69 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,6 @@ name: Release on: + pull_request: push: tags: - 'v*' @@ -19,7 +20,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.release_tag }} + ref: "v1.0.8-oss" +# ref: ${{ github.event.inputs.release_tag }} - name: Set up Java for publishing to Maven Central Repository uses: actions/setup-java@v4 From ff1fbea15a310f2b02b60edfb064e0c40d770e7b Mon Sep 17 00:00:00 2001 From: Jothi Prakash Date: Tue, 5 Aug 2025 00:07:20 +0530 Subject: [PATCH 5/6] Properly refractored --- .github/workflows/release.yml | 8 +- pom.xml | 182 +++++++++++++++------------------- 2 files changed, 84 insertions(+), 106 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 19f781bd69..c7262df11c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,7 +45,7 @@ jobs: MAVEN_CENTRAL_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_CENTRAL_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - - name: Create GitHub release - uses: softprops/action-gh-release@v1 - with: - files: target/*.jar \ No newline at end of file + # - name: Create GitHub release + # uses: softprops/action-gh-release@v1 + # with: + # files: target/*.jar \ No newline at end of file diff --git a/pom.xml b/pom.xml index 48e153b53a..034a08b7c7 100644 --- a/pom.xml +++ b/pom.xml @@ -609,109 +609,87 @@ - - release - - - - org.apache.maven.plugins - maven-source-plugin - 3.3.0 - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.6.0 - - none - ${project.build.sourceDirectory}:${project.build.directory}/generated-sources/annotations - - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - - - sign-and-deploy-file - - deploy - - ${project.build.directory}/${project.build.finalName}.jar - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - --pinentry-mode - loopback - - - ${project.basedir}/uber-minimal-pom.xml - ${project.build.directory}/${project.build.finalName}-sources.jar - ${project.build.directory}/${project.build.finalName}-javadoc.jar - ${project.build.directory}/${project.build.finalName}-thin.jar - jar - thin - - - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.2 + + release + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.8.0 + + none + ${project.build.sourceDirectory}:${project.build.directory}/generated-sources/annotations + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.7 + + + + + sign-and-deploy-file + + deploy - true + ${project.build.directory}/${project.build.finalName}.jar + central + https://central.sonatype.com/api/v1/publisher + + + --pinentry-mode + loopback + + + ${project.basedir}/uber-minimal-pom.xml + ${project.build.directory}/${project.build.finalName}-sources.jar + ${project.build.directory}/${project.build.finalName}-javadoc.jar + ${project.build.directory}/${project.build.finalName}-thin.jar + jar + thin - - - - - - - - - - - - - - - - - - - - - - - - - - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - + + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.3 + + true + + + + + + + central + https://central.sonatype.com/api/v1/publisher + + + From 23e80c133acef4faae6989deb368d236036308f4 Mon Sep 17 00:00:00 2001 From: Jothi Prakash Date: Tue, 5 Aug 2025 00:51:20 +0530 Subject: [PATCH 6/6] New attempt --- pom.xml | 57 +++++++++++++++++++------------------------- uber-minimal-pom.xml | 4 ++-- 2 files changed, 27 insertions(+), 34 deletions(-) diff --git a/pom.xml b/pom.xml index 034a08b7c7..5516f051d8 100644 --- a/pom.xml +++ b/pom.xml @@ -643,27 +643,17 @@ - - org.apache.maven.plugins - maven-gpg-plugin - 3.2.7 - - - - - sign-and-deploy-file - - deploy + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 - ${project.build.directory}/${project.build.finalName}.jar - central - https://central.sonatype.com/api/v1/publisher --pinentry-mode loopback - + ${project.basedir}/uber-minimal-pom.xml ${project.build.directory}/${project.build.finalName}-sources.jar ${project.build.directory}/${project.build.finalName}-javadoc.jar @@ -671,25 +661,28 @@ jar thin - - - - - org.apache.maven.plugins - maven-deploy-plugin - 3.1.3 - - true - - + + + sign-artifacts + + sign + + verify + + + + + org.sonatype.central + central-publishing-maven-plugin + 0.8.0 + true + + central + true + + - - - central - https://central.sonatype.com/api/v1/publisher - - diff --git a/uber-minimal-pom.xml b/uber-minimal-pom.xml index 743996f6db..856eff51db 100644 --- a/uber-minimal-pom.xml +++ b/uber-minimal-pom.xml @@ -35,8 +35,8 @@ - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + central + https://central.sonatype.com/api/v1/publisher