diff --git a/.github/workflows/publish_to_maven_central.yml b/.github/workflows/publish_to_maven_central.yml
new file mode 100644
index 0000000..b34a388
--- /dev/null
+++ b/.github/workflows/publish_to_maven_central.yml
@@ -0,0 +1,33 @@
+name: release and push to central
+on:
+ push:
+ tags:
+ - '*'
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ environment: publish
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Set up Java for publishing to Maven Central Repository
+ uses: actions/setup-java@v4
+ with:
+ java-version: 11
+ server-id: ossrh
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
+ gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
+ gpg-passphrase: MAVEN_GPG_PASSPHRASE
+ - name: build artifact
+ run: mvn clean package -DskipTests
+ - name: Publish to the Maven Central Repository
+ run: |
+ mvn \
+ --no-transfer-progress \
+ --batch-mode \
+ deploy -DskipTests
+ env:
+ MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
+ MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 1468b7c..1bab91f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,6 +8,9 @@
2.3.3
pom
psc-java-oss
+ PubSub Client (PSC)
+ https://github.com/pinterest/psc
+
psc
psc-examples
@@ -28,6 +31,41 @@
0.9.9
+
+
+ vahid
+ Vahid Hashemian
+ Pinterest Logging Platform
+
+
+ jeff
+ Jeff Xiang
+ Pinterest Logging Platform
+
+
+
+
+
+ The Apache Software License, Version 2.0
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+
+
+
+
+ scm:git:git@pinterest/psc.git
+ scm:git:git@github.com:pinterest/psc.git
+ https://github.com/pinterest/psc
+ HEAD
+
+
+
+
+ ossrh
+ Central Repository OSSRH
+ https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+
@@ -102,6 +140,64 @@
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.2.0
+
+
+ attach-javadoc
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ attach-source
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 3.2.7
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+ --pinentry-mode
+ loopback
+
+
+
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.7
+ true
+
+ ossrh
+ https://s01.oss.sonatype.org/
+ true
+
+
+