diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml
new file mode 100644
index 000000000..54457d905
--- /dev/null
+++ b/.github/workflows/deployment.yml
@@ -0,0 +1,48 @@
+# For more information see:
+# * https://docs.github.com/en/actions/learn-github-actions
+# * https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
+# * https://github.com/actions/setup-java/blob/v3.13.0/docs/advanced-usage.md#Publishing-using-Apache-Maven
+#
+
+name: Deployment workflow
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ packages: write
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Java for publishing to Maven Central Repository
+ uses: actions/setup-java@v3
+ with:
+ # Use lowest supported LTS Java version
+ java-version: '8'
+ distribution: 'temurin'
+ server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
+ server-username: MAVEN_USERNAME # env variable for username in deploy
+ server-password: MAVEN_PASSWORD # env variable for token in deploy
+ 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: Publish to the Maven Central Repository
+ run: mvn --batch-mode deploy
+ env:
+ MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
+ MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
+ # - name: Set up Java for publishing to GitHub Packages
+ # uses: actions/setup-java@v3
+ # with:
+ # # Use lowest supported LTS Java version
+ # java-version: '8'
+ # distribution: 'temurin'
+ # - name: Publish to GitHub Packages
+ # run: mvn --batch-mode deploy
+ # env:
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/pom.xml b/pom.xml
index 80c111d5c..ba0efd12d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,12 +21,6 @@
https://github.com/douglascrockford/JSON-java
-
- org.sonatype.oss
- oss-parent
- 9
-
-
https://github.com/douglascrockford/JSON-java.git
scm:git:git://github.com/douglascrockford/JSON-java.git
@@ -52,6 +46,20 @@
UTF-8
+
+
+
+ ossrh
+ Central Repository OSSRH
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+ ossrh
+ https://oss.sonatype.org/content/repositories/snapshots
+
+
+
+
junit