From 70ca3e4161df8ff5606db52d571b78e78f014f9c Mon Sep 17 00:00:00 2001 From: Anush Date: Thu, 21 Dec 2023 00:30:27 +0530 Subject: [PATCH 1/3] cd: Release action cd.yml --- .github/workflows/cd.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ca2b669..410a472 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,8 +1,10 @@ name: Build and Deploy on: + workflow_dispatch: push: - branches: [ "master" ] + tags: + - 'v*' permissions: contents: write @@ -52,7 +54,28 @@ jobs: publish: runs-on: ubuntu-latest needs: build + env: + ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEYID }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} + ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }} + ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }} steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - name: Build + uses: gradle/gradle-build-action@v2 + with: + gradle-version: 8.5 + arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository + - name: Deploy javadoc to Github Pages uses: dev-vince/actions-publish-javadoc@v1.0.1 with: From a5fbb318e8d2bdd5fdb6dff190f30b8b79f47493 Mon Sep 17 00:00:00 2001 From: Anush Date: Thu, 21 Dec 2023 00:31:31 +0530 Subject: [PATCH 2/3] ci: release config build.gradle --- build.gradle | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 722d6c0..d5c7d69 100644 --- a/build.gradle +++ b/build.gradle @@ -20,6 +20,7 @@ plugins { id 'com.google.protobuf' version '0.9.4' id "net.ltgt.errorprone" version '3.1.0' + id 'io.github.gradle-nexus.publish-plugin' version "1.3.0" } group = 'io.qdrant' @@ -201,6 +202,7 @@ publishing { mavenJava(MavenPublication) { from components.java pom { + name = "Qdrant Java Client" description = "${project.description}" url = "https://github.com/${organization}/${repository}" licenses { @@ -228,4 +230,20 @@ publishing { repositories { mavenLocal() } -} \ No newline at end of file +} + +nexusPublishing { + repositories { + sonatype { + nexusUrl = uri("https://s01.oss.sonatype.org/service/local/") + snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") + } + } +} +signing { + def signingKeyId = findProperty("signingKeyId") + def signingKey = findProperty("signingKey") + def signingPassword = findProperty("signingPassword") + useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) + sign publishing.publications.mavenJava +} From ed82541e519028bae6199441646bfcdaeada180d Mon Sep 17 00:00:00 2001 From: Anush Date: Thu, 21 Dec 2023 00:35:02 +0530 Subject: [PATCH 3/3] chore: updated publish step name --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 410a472..6a62e24 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -70,7 +70,7 @@ jobs: java-version: '17' distribution: 'temurin' - - name: Build + - name: Publish package uses: gradle/gradle-build-action@v2 with: gradle-version: 8.5