diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..6955c3d6
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,27 @@
+name: Publish package to the Maven Central Repository
+on:
+ push:
+ tags: [ "*" ]
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Maven Central Repository
+ uses: actions/setup-java@v2
+ with:
+ java-version: '8'
+ distribution: 'adopt'
+ server-id: ossrh
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
+ - id: install-secret-key
+ name: Install gpg secret key
+ run: |
+ cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
+ gpg --list-secret-keys --keyid-format LONG
+ - name: Publish package
+ env:
+ MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
+ run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -P release clean deploy
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 053f61a5..c6b0e321 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
com.github.pagehelper
pagehelper
- 5.3.0
+ 5.3.1-SNAPSHOT
jar
pagehelper 5
@@ -274,16 +274,32 @@
+
+
+ --pinentry-mode
+ loopback
+
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ true
+
+ ossrh
+ https://oss.sonatype.org/
+ true
+
- oss
+ ossrh
https://oss.sonatype.org/content/repositories/snapshots/
- oss
+ ossrh
https://oss.sonatype.org/service/local/staging/deploy/maven2/