From 7850f37d9cae864ec52a9f4c97472b75e59ecc51 Mon Sep 17 00:00:00 2001 From: rohanshah18 Date: Fri, 23 May 2025 15:52:01 -0400 Subject: [PATCH 1/6] print version only --- .github/workflows/release.yml | 40 ++++++++++++++++------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a7037b47..eae049fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,16 @@ on: - 'patch' # bug fixes - 'minor' # new features, backwards compatible - 'major' # breaking changes - + isPrerelease: + description: 'Whether this is a prerelease' + required: true + type: boolean + default: true + prereleaseSuffix: + description: 'Suffix to add onto the new version number in order to mark it as a prerelease. Value ignored when shipping a release that is not a prerelease.' + required: false + type: string + default: 'rc1' jobs: release: runs-on: ubuntu-latest @@ -54,6 +63,11 @@ jobs: ;; esac + # Append prerelease suffix if isPrerelease is true + if [[ "${{ github.event.inputs.isPrerelease }}" == "true" ]]; then + NEW_VERSION="$NEW_VERSION-${{ github.event.inputs.prereleaseSuffix }}" + fi + # Update gradle.properties sed -i "s/pineconeClientVersion = .*/pineconeClientVersion = $NEW_VERSION/" gradle.properties @@ -63,25 +77,7 @@ jobs: - name: Build with Gradle run: ./gradlew clean build - - name: Publish to Maven Central - env: - ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }} - ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} - ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} - ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} - ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} - run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository - - - name: Create GitHub Release - uses: softprops/action-gh-release@v1 - with: - name: Release v${{ env.NEW_VERSION }} - tag_name: v${{ env.NEW_VERSION }} - body: | - Release v${{ env.NEW_VERSION }} - - This release was created automatically by the release workflow. - draft: false - prerelease: false + - name: Echo New Version + run: echo "New version is $NEW_VERSION" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + NEW_VERSION: ${{ env.NEW_VERSION }} \ No newline at end of file From 6a82de810f0f0b57a741b79fdc7b45a433200525 Mon Sep 17 00:00:00 2001 From: rohanshah18 Date: Fri, 23 May 2025 16:13:08 -0400 Subject: [PATCH 2/6] add publishing to maven central step --- .github/workflows/release.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eae049fc..482f2afe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,6 +27,7 @@ on: required: false type: string default: 'rc1' + jobs: release: runs-on: ubuntu-latest @@ -80,4 +81,13 @@ jobs: - name: Echo New Version run: echo "New version is $NEW_VERSION" env: - NEW_VERSION: ${{ env.NEW_VERSION }} \ No newline at end of file + NEW_VERSION: ${{ env.NEW_VERSION }} + + - name: Publish to Maven Central + env: + ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} + ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} + ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} + run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository \ No newline at end of file From b5eecc4e73be21ca26ca58ab548e8b60f826bfa5 Mon Sep 17 00:00:00 2001 From: rohanshah18 Date: Tue, 27 May 2025 09:16:18 -0400 Subject: [PATCH 3/6] update ossrh to staging --- build.gradle | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 49fb36b3..530d7905 100644 --- a/build.gradle +++ b/build.gradle @@ -218,9 +218,8 @@ publishing { nexusPublishing { repositories { sonatype { - nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) - } + nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) + snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) } } From d2ed4473d403eb65d83c238c7448d3bcb4f83a2f Mon Sep 17 00:00:00 2001 From: rohanshah18 Date: Tue, 27 May 2025 09:27:57 -0400 Subject: [PATCH 4/6] fix closing } --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 530d7905..0b0c8d7b 100644 --- a/build.gradle +++ b/build.gradle @@ -220,6 +220,7 @@ nexusPublishing { sonatype { nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) + } } } From 0179ac17bc2b40d634815606ae914c917fbbaa29 Mon Sep 17 00:00:00 2001 From: rohanshah18 Date: Wed, 4 Jun 2025 17:28:50 -0400 Subject: [PATCH 5/6] add --no-daemon flag --- .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 482f2afe..fad28992 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,4 +90,4 @@ jobs: ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} - run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository \ No newline at end of file + run: ./gradlew --no-daemon publishToSonatype closeAndReleaseSonatypeStagingRepository \ No newline at end of file From 915db8ab0c33ac6b45921fc29e95307eb28aa4c8 Mon Sep 17 00:00:00 2001 From: rohanshah18 Date: Wed, 4 Jun 2025 17:32:54 -0400 Subject: [PATCH 6/6] remove --no-daemon and run gradle --stop before --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fad28992..f4ee7174 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,6 +78,9 @@ jobs: - name: Build with Gradle run: ./gradlew clean build + - name: Stop daemon + run: ./gradlew --stop + - name: Echo New Version run: echo "New version is $NEW_VERSION" env: @@ -90,4 +93,4 @@ jobs: ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} - run: ./gradlew --no-daemon publishToSonatype closeAndReleaseSonatypeStagingRepository \ No newline at end of file + run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository \ No newline at end of file