From 18f4b240c5c1e4d52e3c9cd2e290365e4b1958a2 Mon Sep 17 00:00:00 2001 From: Oryan M Date: Tue, 4 May 2021 11:48:22 -0400 Subject: [PATCH 1/3] Remove bintray and deploy to maven central --- .github/workflows/release.yml | 13 +++---- .github/workflows/snapshot.yml | 12 +++---- github-build.sh | 4 +-- pom.xml | 62 ++++++++++++++++++++-------------- 4 files changed, 51 insertions(+), 40 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index add30dec..f0688c39 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,19 +20,20 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Setup Bintray + - name: Setup Maven Central uses: actions/setup-java@v2 with: java-version: '8' distribution: 'adopt' - server-id: bintray - server-username: BINTRAY_USER - server-password: BINTRAY_PASS + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.GPG_KEY_CONTENTS }} + gpg-passphrase: GPG_PASSPHRASE - name: Publish release run: bash github-build.sh env: - BINTRAY_USER: ${{ secrets.BINTRAY_USER }} - BINTRAY_PASS: ${{ secrets.BINTRAY_PASSWORD }} MAVEN_USERNAME: ${{ secrets.OSS_USER_TOKEN_KEY }} MAVEN_PASSWORD: ${{ secrets.OSS_USER_TOKEN_PASS }} + GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSWORD }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index c6021d6e..6c7fbe87 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -23,18 +23,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Setup Bintray + - name: Setup Maven Central uses: actions/setup-java@v2 with: java-version: '8' distribution: 'adopt' - server-id: bintray - server-username: BINTRAY_USER - server-password: BINTRAY_PASS + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD - name: Publish release - run: mvn --batch-mode -Pbintray deploy + run: mvn --batch-mode deploy env: - BINTRAY_USER: ${{ secrets.BINTRAY_USER }} - BINTRAY_PASS: ${{ secrets.BINTRAY_PASSWORD }} MAVEN_USERNAME: ${{ secrets.OSS_USER_TOKEN_KEY }} MAVEN_PASSWORD: ${{ secrets.OSS_USER_TOKEN_PASS }} diff --git a/github-build.sh b/github-build.sh index 047c5f00..ca80d8f4 100644 --- a/github-build.sh +++ b/github-build.sh @@ -43,10 +43,10 @@ commitNextVersion() { git config --global user.email "actions@github.com" git config --global user.name "GitHub Actions" -echo "Deploying release to Bintray" +echo "Deploying release to Maven Central" removeSnapshots -mvn --batch-mode -Pbintray deploy +mvn --batch-mode -Prelease deploy commitRelease bumpVersion diff --git a/pom.xml b/pom.xml index 1e4a5dad..8f9298b5 100644 --- a/pom.xml +++ b/pom.xml @@ -243,15 +243,6 @@ - - org.apache.maven.plugins - maven-release-plugin - 2.5.3 - - @{project.version} - false - - org.apache.maven.plugins maven-jar-plugin @@ -279,18 +270,29 @@ - + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + ossrh + https://s01.oss.sonatype.org/ + true + + - bintray + release @@ -302,7 +304,7 @@ attach-sources package - jar + jar-no-fork @@ -320,6 +322,27 @@ + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + + --pinentry-mode + loopback + + + @@ -341,19 +364,9 @@ - bintray - graphql-java-kickstart-graphql-java-tools - http://oss.jfrog.org/artifactory/oss-snapshot-local + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots - - - - bintray - graphql-java-kickstart-graphql-java-tools - - https://api.bintray.com/maven/graphql-java-kickstart/releases/graphql-java-tools/;publish=1 - - scm:git:https://github.com/graphql-java-kickstart/graphql-java-tools.git @@ -361,6 +374,5 @@ scm:git:https://github.com/graphql-java-kickstart/graphql-java-tools.git https://github.com/graphql-java-kickstart/graphql-java-tools - HEAD From a02217ebca1764f59027285a4f899eb270844e8e Mon Sep 17 00:00:00 2001 From: Oryan M Date: Tue, 4 May 2021 13:15:57 -0400 Subject: [PATCH 2/3] Change to legacy host --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8f9298b5..dfdbcf77 100644 --- a/pom.xml +++ b/pom.xml @@ -283,7 +283,7 @@ true ossrh - https://s01.oss.sonatype.org/ + https://oss.sonatype.org/ true @@ -365,7 +365,7 @@ ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots + https://oss.sonatype.org/content/repositories/snapshots From 451a771e3a9af9e10653454169e4483027109cc4 Mon Sep 17 00:00:00 2001 From: Oryan M Date: Tue, 4 May 2021 15:21:32 -0400 Subject: [PATCH 3/3] Set auto release to false --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dfdbcf77..18b12e4b 100644 --- a/pom.xml +++ b/pom.xml @@ -284,7 +284,8 @@ ossrh https://oss.sonatype.org/ - true + + false