From 6ce43341935697ab769d58b06802a33d64f783b3 Mon Sep 17 00:00:00 2001 From: Srinivasan Sekar Date: Tue, 1 Jul 2025 12:01:20 +0530 Subject: [PATCH 1/9] fix: release 9.5.0 Co-authored-by: Saikrishna321 --- .github/workflows/publish.yml | 5 +++-- .gitignore | 1 + build.gradle | 29 +++++++++++++++++++++-------- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6b2a253c2..cdf92c02c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,8 @@ name: Publish package to the Maven Central Repository on: - release: - types: [created] + push: + branches: + - release/mavenCentral jobs: publish: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index dea3a9d88..da44d7acb 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ classes/ /.settings .classpath .project +.vscode diff --git a/build.gradle b/build.gradle index 0686b5c72..4d2245ad3 100644 --- a/build.gradle +++ b/build.gradle @@ -9,6 +9,7 @@ plugins { id 'signing' id 'org.owasp.dependencycheck' version '12.1.3' id 'com.gradleup.shadow' version '8.3.7' + id 'org.jreleaser' version '1.19.0' } repositories { @@ -16,7 +17,7 @@ repositories { if (project.hasProperty("isCI")) { maven { - url uri('https://oss.sonatype.org/content/repositories/snapshots/') + url uri('https://central.sonatype.com/api/v1/publisher') mavenContent { snapshotsOnly() } @@ -160,13 +161,7 @@ publishing { } repositories { maven { - credentials { - username = System.getenv("MAVEN_USERNAME") - password = System.getenv("MAVEN_PASSWORD") - } - def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" - def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/'" - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl + url = layout.buildDirectory.dir('staging-deploy') } } } @@ -179,6 +174,24 @@ signing { sign publishing.publications.mavenJava } +jreleaser { + signing { + active = 'ALWAYS' + armored = true + } + deploy { + maven { + mavenCentral { + sonatype { + active = 'ALWAYS' + url = 'https://central.sonatype.com/api/v1/publisher' + stagingRepository('build/staging-deploy') + } + } + } + } +} + wrapper { gradleVersion = '8.14' distributionType = Wrapper.DistributionType.ALL From f934e1c0270ac5706df2f15a60ba659124ddd28b Mon Sep 17 00:00:00 2001 From: Srinivasan Sekar Date: Tue, 1 Jul 2025 12:05:13 +0530 Subject: [PATCH 2/9] fix: release 9.5.0 Co-authored-by: Saikrishna321 --- .github/workflows/publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cdf92c02c..05b882357 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,4 +23,6 @@ jobs: MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} PGP_SECRET: ${{ secrets.SIGNING_KEY }} PGP_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }} - run: ./gradlew publish + run: | + ./gradlew publish + ./gradlew jreleaserDeploy From 66546b0dfad17b461feb809f870980dbf6a380f5 Mon Sep 17 00:00:00 2001 From: Srinivasan Sekar Date: Tue, 1 Jul 2025 12:08:15 +0530 Subject: [PATCH 3/9] fix: release 9.5.0 Co-authored-by: Saikrishna321 --- .github/workflows/publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 05b882357..682906045 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,6 +23,8 @@ jobs: MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} PGP_SECRET: ${{ secrets.SIGNING_KEY }} PGP_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }} + JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.SIGNING_PASSWORD }} + JRELEASER_GPG_SECRET_KEY: ${{ secrets.SIGNING_KEY }} run: | ./gradlew publish ./gradlew jreleaserDeploy From 2ad5ec1d580553baa590e76b9bdd8beef7d22bac Mon Sep 17 00:00:00 2001 From: Srinivasan Sekar Date: Tue, 1 Jul 2025 12:13:01 +0530 Subject: [PATCH 4/9] fix: jreleaser in build.gradle Co-authored-by: Saikrishna321 --- build.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.gradle b/build.gradle index 4d2245ad3..7ce98a182 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,9 @@ plugins { id 'org.jreleaser' version '1.19.0' } +group = 'io.appium' +version = appiumClientVersion + repositories { mavenCentral() @@ -175,6 +178,9 @@ signing { } jreleaser { + project { + version = project.version + } signing { active = 'ALWAYS' armored = true From 94ef72589700e76daec610369493d9eec339ba4c Mon Sep 17 00:00:00 2001 From: Srinivasan Sekar Date: Tue, 1 Jul 2025 12:16:20 +0530 Subject: [PATCH 5/9] fix: jreleaser Co-authored-by: Saikrishna321 --- build.gradle | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 7ce98a182..57797b896 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,12 @@ plugins { id 'org.jreleaser' version '1.19.0' } +ext { + seleniumVersion = project.property('selenium.version') + appiumClientVersion = project.property('appiumClient.version') + slf4jVersion = '2.0.17' +} + group = 'io.appium' version = appiumClientVersion @@ -35,12 +41,6 @@ java { withSourcesJar() } -ext { - seleniumVersion = project.property('selenium.version') - appiumClientVersion = project.property('appiumClient.version') - slf4jVersion = '2.0.17' -} - dependencies { compileOnly 'org.projectlombok:lombok:1.18.38' annotationProcessor 'org.projectlombok:lombok:1.18.38' @@ -178,9 +178,6 @@ signing { } jreleaser { - project { - version = project.version - } signing { active = 'ALWAYS' armored = true From f3caf1c8f303cb1dc2f7f40df2dcd35b9dc96466 Mon Sep 17 00:00:00 2001 From: Srinivasan Sekar Date: Tue, 1 Jul 2025 12:30:46 +0530 Subject: [PATCH 6/9] fix: jreleaser Co-authored-by: Saikrishna321 --- .github/workflows/publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 682906045..3411e9bff 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,12 +19,12 @@ jobs: - name: Publish package env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} PGP_SECRET: ${{ secrets.SIGNING_KEY }} PGP_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }} - JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.SIGNING_PASSWORD }} JRELEASER_GPG_SECRET_KEY: ${{ secrets.SIGNING_KEY }} + JRELEASER_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }} + JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }} + JRELEASER_MAVENCENTRAL_SONATYPE_PASSWORD: ${{ secrets.OSSRH_TOKEN }} run: | ./gradlew publish ./gradlew jreleaserDeploy From c21c554e7265caae0c2a98b9d2cc331453f53141 Mon Sep 17 00:00:00 2001 From: Srinivasan Sekar Date: Tue, 1 Jul 2025 12:35:45 +0530 Subject: [PATCH 7/9] fix: jreleaser Co-authored-by: Saikrishna321 --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3411e9bff..730f14f6e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,6 +21,7 @@ jobs: env: PGP_SECRET: ${{ secrets.SIGNING_KEY }} PGP_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }} + JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.SIGNING_KEY }} JRELEASER_GPG_SECRET_KEY: ${{ secrets.SIGNING_KEY }} JRELEASER_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }} JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }} From 836c4da59c90a7376f3f185e036d7ced651f5bfb Mon Sep 17 00:00:00 2001 From: Srinivasan Sekar Date: Tue, 1 Jul 2025 12:52:59 +0530 Subject: [PATCH 8/9] update signing keys Co-authored-by: Saikrishna321 --- .github/workflows/publish.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 730f14f6e..798e2656a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,11 +19,11 @@ jobs: - name: Publish package env: - PGP_SECRET: ${{ secrets.SIGNING_KEY }} - PGP_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }} - JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.SIGNING_KEY }} - JRELEASER_GPG_SECRET_KEY: ${{ secrets.SIGNING_KEY }} - JRELEASER_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }} + PGP_SECRET: ${{ secrets.JRELEASER_SIGNING_KEY }} + PGP_PASSPHRASE: ${{ secrets.JRELEASER_SIGNING_PASSWORD }} + JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.SIGNING_PUBLIC_KEY }} + JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_SIGNING_KEY }} + JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_SIGNING_PASSWORD }} JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }} JRELEASER_MAVENCENTRAL_SONATYPE_PASSWORD: ${{ secrets.OSSRH_TOKEN }} run: | From d96cb5277a3972fc97b54309a7a3b39f9b2fc11d Mon Sep 17 00:00:00 2001 From: Srinivasan Sekar Date: Mon, 7 Jul 2025 11:11:14 +0530 Subject: [PATCH 9/9] fix release process Co-authored-by: Saikrishna321 --- .github/workflows/publish.yml | 7 ++----- build.gradle | 8 -------- docs/release.md | 32 ++++++++++++++------------------ 3 files changed, 16 insertions(+), 31 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 798e2656a..6392f5692 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,8 +1,7 @@ name: Publish package to the Maven Central Repository on: - push: - branches: - - release/mavenCentral + release: + types: [created] jobs: publish: runs-on: ubuntu-latest @@ -19,8 +18,6 @@ jobs: - name: Publish package env: - PGP_SECRET: ${{ secrets.JRELEASER_SIGNING_KEY }} - PGP_PASSPHRASE: ${{ secrets.JRELEASER_SIGNING_PASSWORD }} JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.SIGNING_PUBLIC_KEY }} JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_SIGNING_KEY }} JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_SIGNING_PASSWORD }} diff --git a/build.gradle b/build.gradle index 57797b896..48cd82353 100644 --- a/build.gradle +++ b/build.gradle @@ -169,14 +169,6 @@ publishing { } } -signing { - required { !'true'.equalsIgnoreCase(project.findProperty('signingDisabled')) } - def signingKey = System.getenv("PGP_SECRET") - def signingPassword = System.getenv("PGP_PASSPHRASE") - useInMemoryPgpKeys(signingKey, signingPassword) - sign publishing.publications.mavenJava -} - jreleaser { signing { active = 'ALWAYS' diff --git a/docs/release.md b/docs/release.md index f2a6c1ae6..9a84ee016 100644 --- a/docs/release.md +++ b/docs/release.md @@ -9,21 +9,17 @@ Its target auditory is project maintainers. 1. Bump the `appiumClient.version` number in [gradle.properties](../gradle.properties). 1. Create a pull request to approve the changelog and version bump. 1. Merge the pull request after it is approved. -1. Create and push a new repository tag. The tag name should look like - `v..`. -1. Create a new [Release](https://github.com/appium/java-client/releases/new) in GitHub. - Paste the above changelist into the release notes. Make sure the name of the new release - matches to the name of the above tag. -1. Open [Sonatype](https://oss.sonatype.org/#welcome) in your browser. -1. Login to Nexus using 1Password credentials. Ask Appium maintainers - if you need access to the team's 1Password vault. -1. Navigate to `Staging Repositories`. -1. Select the corresponding release and click `Close`. Note that it may take - some minutes until Sonatype picks up the GitHub release. -1. Wait until checks are completed. -1. Click `Release`. -1. After the new release is published, it becomes available in - [Maven Central](https://repo1.maven.org/maven2/io/appium/java-client/) - within 30 minutes. Once artifacts are in Maven Central, it normally - takes 1-2 hours before they appear in - [search results](https://central.sonatype.com/artifact/io.appium/java-client). +1. Create and push a new repository tag. The tag name should look like + `v..`. +1. Create a new [Release](https://github.com/appium/java-client/releases/new) in GitHub. + Paste the above changelist into the release notes. Make sure the name of the new release + matches to the name of the above tag. +1. Open [Maven Central Repository](https://central.sonatype.com/) in your browser. +1. Log in to the `Maven Central Repository` using the credentials stored in 1Password. If you need access to the team's 1Password vault, contact the Appium maintainers. +1. Navigate to the `Publish` section. +1. Under `Deployments`, you will see the latest deployment being published. Note: Sometimes the status may remain in the `publishing` state for an extended period, but it will eventually complete. +1. After the new release is published, it becomes available in + [Maven Central](https://repo1.maven.org/maven2/io/appium/java-client/) + within 30 minutes. Once artifacts are in Maven Central, it normally + takes 1-2 hours before they appear in + [search results](https://central.sonatype.com/artifact/io.appium/java-client).