From 3343aa9ca41f69d9479d333e2f2df621ea8819f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=87=95=E9=99=87=E7=90=AA?= Date: Wed, 2 Apr 2025 17:30:02 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=81=E6=B0=B4=E7=BA=BF):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0github=E7=9A=84=E6=B5=81=E6=B0=B4=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ pom.xml | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9d338d9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release to Maven Central + +on: + release: + types: [released] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout Git Repo + uses: actions/checkout@v2 + - name: Set up Maven Central Repo + uses: actions/setup-java@v1 + with: + java-version: 1.8 + server-id: sonatype-nexus-staging + server-username: ${{ secrets.OSSRH_USER }} + server-password: ${{ secrets.OSSRH_PASSWORD }} + gpg-passphrase: ${{ secrets.GPG_PASSWORD }} + - name: Publish to Maven Central Repo + uses: samuelmeuli/action-maven-publish@v1 + with: + gpg_private_key: ${{ secrets.GPG_SECRET }} + gpg_passphrase: ${{ secrets.GPG_PASSWORD }} + nexus_username: ${{ secrets.OSSRH_USER }} + nexus_password: ${{ secrets.OSSRH_PASSWORD }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 880a045..6cbf455 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 8 UTF-8 false - + true