From 5da72f1cae6b24315e5afc87520aaf7b4d6bb872 Mon Sep 17 00:00:00 2001
From: LFC <990479+MichaelScofield@users.noreply.github.com>
Date: Tue, 31 Oct 2023 16:24:20 +0800
Subject: [PATCH] ci: publish maven artifact (#116)
---
.github/workflows/mvn_publish.yml | 32 +++++++++
java/pom.xml | 104 +++++++++++++++++++++++++++++-
2 files changed, 135 insertions(+), 1 deletion(-)
create mode 100644 .github/workflows/mvn_publish.yml
diff --git a/.github/workflows/mvn_publish.yml b/.github/workflows/mvn_publish.yml
new file mode 100644
index 0000000..aa91441
--- /dev/null
+++ b/.github/workflows/mvn_publish.yml
@@ -0,0 +1,32 @@
+name: Maven Publish
+
+on:
+ release:
+ types: [ created ]
+ workflow_dispatch:
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Git Repo
+ uses: actions/checkout@v2
+
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+ server-id: ossrh
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
+ gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
+ gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
+
+ - name: Build with Maven
+ run: |
+ cd java
+ mvn clean deploy --batch-mode -DskipTests -P release -B -U -e
+ env:
+ MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
+ MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
diff --git a/java/pom.xml b/java/pom.xml
index fbd7e4b..609b44a 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -5,7 +5,109 @@
io.greptime
greptimedb-proto
- 0.1.0
+ 0.4.0
+
+ ${project.groupId}:${project.artifactId}
+ GreptimeDB protobuf files for Java
+ https://github.com/GreptimeTeam/greptime-proto
+
+
+
+ The Apache License, Version 2.0
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+
+
+
+
+
+ Jeremy
+ jiachun@greptime.com
+ GreptimeTeam
+ https://greptime.com
+
+
+
+
+ scm:git:git://github.com/GreptimeTeam/greptimedb-client-java.git
+ scm:git:ssh://github.com:GreptimeTeam/greptimedb-client-java.git
+ https://github.com/GreptimeTeam/greptimedb-client-java/tree/main
+
+
+
+
+ ossrh
+ https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+ ossrh
+ https://s01.oss.sonatype.org/content/repositories/snapshots/
+
+
+
+
+
+ release
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.7
+ true
+
+ ossrh
+ https://s01.oss.sonatype.org/
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.0.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.9.1
+
+
+ attach-javadocs
+ package
+
+ jar
+
+
+ -Xdoclint:none
+
+
+
+
+
+
+
+
8