diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a7037b47..f4ee7174 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -17,6 +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:
@@ -54,6 +64,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,6 +78,14 @@ 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:
+ NEW_VERSION: ${{ env.NEW_VERSION }}
+
- name: Publish to Maven Central
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }}
@@ -70,18 +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 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
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
+ run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 49fb36b3..0b0c8d7b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -218,8 +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/"))
}
}
}