diff --git a/.github/workflows/maven-central-release.yml b/.github/workflows/maven-central-release.yml
new file mode 100644
index 0000000..4d67ce0
--- /dev/null
+++ b/.github/workflows/maven-central-release.yml
@@ -0,0 +1,38 @@
+name: Release to Maven Central
+
+on:
+ push:
+ tags:
+ - 'v*'
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Java
+ uses: actions/setup-java@v4
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ cache: 'maven'
+ server-id: ossrh
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
+ gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
+ gpg-passphrase: MAVEN_GPG_PASSPHRASE
+
+ - name: Build and Test
+ run: mvn clean verify
+
+ - name: Publish to Maven Central
+ run: |
+ mvn --batch-mode \
+ -Prelease \
+ -Pjavadoc \
+ deploy
+ env:
+ MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
+ MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
diff --git a/pom.xml b/pom.xml
index 97dd9a2..8462e58 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,12 +26,12 @@
https://spring.io
-
-
- MIT License
- http://www.opensource.org/licenses/mit-license.php
-
-
+
+
+ MIT License
+ http://www.opensource.org/licenses/mit-license.php
+
+
@@ -51,13 +51,11 @@
https://github.com/modelcontextprotocol/java-sdk/actions
-
- spring-snapshots
- https://repo.spring.io/libs-snapshot-local
-
- false
-
-
+
+ ossrh
+ Central Repository OSSRH
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
@@ -299,26 +297,45 @@
- artifactory-staging
+ relesae
+
+
+
+ org.sonatype.central
+ central-publishing-maven-plugin
+ 0.7.0
+ true
+
+ central
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 3.1.0
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+ --pinentry-mode
+ loopback
+
+
+
+
+
+
+
- spring-staging
- https://repo.spring.io/libs-staging-local
-
- false
-
-
-
-
-
- artifactory-milestone
-
-
- spring-milestones
- https://repo.spring.io/libs-milestone-local
-
- false
-
+ ossrh
+ Central Repository OSSRH
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
@@ -365,4 +382,4 @@
-
+
\ No newline at end of file