Skip to content

Commit

Permalink
cd: Automated releases (#15)
Browse files Browse the repository at this point in the history
* cd: Release action cd.yml

* ci: release config build.gradle

* chore: updated publish step name
  • Loading branch information
Anush008 authored Dec 21, 2023
1 parent 8d37efd commit b416d22
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Build and Deploy

on:
workflow_dispatch:
push:
branches: [ "master" ]
tags:
- 'v*'

permissions:
contents: write
Expand Down Expand Up @@ -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: Publish package
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.5
arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository

- name: Deploy javadoc to Github Pages
uses: dev-vince/[email protected]
with:
Expand Down
19 changes: 19 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -229,3 +231,20 @@ publishing {
mavenLocal()
}
}

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
}

0 comments on commit b416d22

Please sign in to comment.