diff --git a/.github/workflows/ci-maven-publish-release.yaml b/.github/workflows/ci-maven-publish-release.yaml
index df530ba2..d9491599 100644
--- a/.github/workflows/ci-maven-publish-release.yaml
+++ b/.github/workflows/ci-maven-publish-release.yaml
@@ -13,6 +13,7 @@ concurrency:
cancel-in-progress: true
jobs:
build:
+ name: Release to Maven Central
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17
@@ -31,23 +32,15 @@ jobs:
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- - name: Build and Verify
- run: mvn --no-transfer-progress --batch-mode verify
- - name: Package surefire test results
- if: failure()
- run: |
- rm -rf test-results
- mkdir test-results
- find . -type d -name "*surefire*" -exec cp --parents -R {} test-results/ \;
- zip -r test-results.zip test-results
- - name: Upload test results
- uses: actions/upload-artifact@v3
- if: failure()
+
+ - name: Release Maven package
+ uses: samuelmeuli/action-maven-publish@v1
with:
- name: test-results
- path: test-results.zip
- - name: Publish to the Maven Central Repository
- run: mvn --batch-mode -Prelease -DskipTests deploy
- env:
- MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
- MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
+ gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
+ gpg_passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
+ nexus_username: ${{ secrets.SONATYPE_USERNAME }}
+ nexus_password: ${{ secrets.SONATYPE_PASSWORD }}
+ server_id: ossrh
+ maven_profiles: release
+ maven_goals_phases: clean install deploy
+ maven_args: -DskipTests
diff --git a/pom.xml b/pom.xml
index a08fa132..df20afd7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,6 +41,13 @@
+
+
+ StreamNative Inc.
+ https://streamnative.io/
+
+
+
client
client-metrics-api
@@ -448,43 +455,23 @@
release
-
-
- net.nicoulaj.maven.plugins
- checksum-maven-plugin
- 1.11
-
-
- source-release-checksum
-
- artifacts
-
- post-integration-test
-
-
- MD5
- SHA-1
- SHA-512
-
- source-release
- true
- false
- true
-
-
-
-
-
- org.apache.maven.plugins
maven-gpg-plugin
3.1.0
+
+
+
+ --pinentry-mode
+ loopback
+
+
- sign-release-artifacts
+ sign-artifacts
sign
+ verify
@@ -510,21 +497,18 @@
- org.apache.maven.plugins
- maven-source-plugin
- 3.3.0
-
-
-
- jar-no-fork
-
- verify
-
-
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.13
+ true
+
+ ossrh
+ https://s01.oss.sonatype.org/
+ true
+
-