From 06ec9d8748fe02c5828ecace76904aed197fde23 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 11:18:25 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..6eb9b075 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +## +## Copyright 2009-2021 the original author or authors. +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## +# +#name: Publish package to the Maven Central Repository +# +#on: +# push: +# branches: +# - master +# 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 }} clean deploy +# From 3643937dfbc5e3f294eaa619ef9844bf64f671b4 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 14:17:23 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 86 +++++++++++++++++------------------ pom.xml | 24 ++++++++++ 2 files changed, 66 insertions(+), 44 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6eb9b075..df177bd4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,48 +1,46 @@ -## -## Copyright 2009-2021 the original author or authors. -## -## Licensed under the Apache License, Version 2.0 (the "License"); -## you may not use this file except in compliance with the License. -## You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## # -#name: Publish package to the Maven Central Repository +# Copyright 2009-2021 the original author or authors. # -#on: -# push: -# branches: -# - master -# tags: [ "*" ] +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -#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 }} clean deploy +# http://www.apache.org/licenses/LICENSE-2.0 # +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +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 }} clean deploy \ No newline at end of file diff --git a/pom.xml b/pom.xml index 39ca4669..2625a4f3 100644 --- a/pom.xml +++ b/pom.xml @@ -229,6 +229,11 @@ flatten-maven-plugin 1.2.7 + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + @@ -307,6 +312,13 @@ + + + + --pinentry-mode + loopback + + org.apache.maven.plugins @@ -389,6 +401,18 @@ + + + + org.sonatype.plugins + nexus-staging-maven-plugin + true + + ossrh + https://oss.sonatype.org/ + + + From dead426418dea2614abc6e8a03ea2d997e311e4f Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 14:19:50 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df177bd4..9701c680 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ # limitations under the License. # -name: Publish package to the Maven Central Repository +name: Publish to Maven on: push: From e624b1914041a1460fa566f2249bf53033c7452f Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 14:21:47 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9701c680..86c3403a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,8 +19,7 @@ name: Publish to Maven on: push: tags: - - ** - + - * jobs: publish: runs-on: ubuntu-latest From d06feeefa2fb34c68d7d057f8d75a706b19a71e1 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 14:23:46 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86c3403a..36257815 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,8 +18,8 @@ name: Publish to Maven on: push: - tags: - - * + tags: [ "*" ] + jobs: publish: runs-on: ubuntu-latest From 00be5b1703ffdde40f2cc8a26185681c057cb0d0 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 14:25:02 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 36257815..33b5bc44 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ # limitations under the License. # -name: Publish to Maven +name: Publish package to the Maven Central Repository on: push: From b8d53c14a6afb6d1b2c267569382cfae00e80c22 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 14:56:08 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33b5bc44..70ab157e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,4 +42,4 @@ jobs: env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} clean deploy \ No newline at end of file + run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} clean deploy -Dmaven.test.skip=false -Dmaven.javadoc.skip=false -Dgpg.skip=false \ No newline at end of file From d30f56d932944d32539062d70c97494ae4860e16 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 15:52:55 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 6 +++--- .github/workflows/release.yml | 30 ++++++++++++------------------ pom.xml | 2 +- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76e5b481..728e060e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,14 +30,14 @@ jobs: name: Test JDK ${{ matrix.java }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@main - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@main with: java-version: ${{ matrix.java }} distribution: ${{ matrix.distribution }} - name: Cache Maven - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2 key: m2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70ab157e..c2a75d2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,22 +24,16 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Maven Central Repository - uses: actions/setup-java@v2 + - name: Check out Git repository + uses: actions/checkout@main + - name: Install Java and Maven + uses: actions/setup-java@main 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 }} clean deploy -Dmaven.test.skip=false -Dmaven.javadoc.skip=false -Dgpg.skip=false \ No newline at end of file + java-version: 8 + - name: Release Maven package + uses: samuelmeuli/action-maven-publish@v1 + with: + gpg_private_key: ${{ secrets.gpg_private_key }} + gpg_passphrase: ${{ secrets.gpg_passphrase }} + nexus_username: ${{ secrets.nexus_username }} + nexus_password: ${{ secrets.nexus_password }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 2625a4f3..1c0b667d 100644 --- a/pom.xml +++ b/pom.xml @@ -410,7 +410,7 @@ ossrh https://oss.sonatype.org/ - + false From bb97c51dbc304617c4db542b9a849abc9e03bd27 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 15:56:03 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2a75d2d..d845ae0f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,6 +30,7 @@ jobs: uses: actions/setup-java@main with: java-version: 8 + distribution: 'adopt' - name: Release Maven package uses: samuelmeuli/action-maven-publish@v1 with: From 139d9eede7c108ef2ea164a49262b2a29603f93d Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 16:00:59 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d845ae0f..757a6842 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,8 @@ jobs: - name: Release Maven package uses: samuelmeuli/action-maven-publish@v1 with: - gpg_private_key: ${{ secrets.gpg_private_key }} - gpg_passphrase: ${{ secrets.gpg_passphrase }} - nexus_username: ${{ secrets.nexus_username }} - nexus_password: ${{ secrets.nexus_password }} \ No newline at end of file + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} + nexus_username: ${{ secrets.NEXUS_USERNAME }} + nexus_password: ${{ secrets.NEXUS_PASSWORD }} + maven_args: -Dmaven.test.skip=false -Dmaven.javadoc.skip=false -Dgpg.skip=false \ No newline at end of file From c4db560cf7bda70e49aa30cc01e4af7ef8b92270 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 16:09:46 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8C=87=E5=AF=BC?= =?UTF-8?q?=E5=B7=A5=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 757a6842..b007fdbc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,10 @@ jobs: with: java-version: 8 distribution: 'adopt' + server-id: sonatype-nexus-staging + server-username: ${{ secrets.NEXUS_USERNAME }} + server-password: ${{ secrets.NEXUS_PASSWORD }} + gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} - name: Release Maven package uses: samuelmeuli/action-maven-publish@v1 with: From 68d1ee0e01d51974a92313d51b84aaad3fe7a957 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 16:24:50 +0800 Subject: [PATCH 12/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b007fdbc..5fef4211 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,8 +17,8 @@ name: Publish package to the Maven Central Repository on: - push: - tags: [ "*" ] + release: + types: [created] jobs: publish: @@ -31,15 +31,11 @@ jobs: with: java-version: 8 distribution: 'adopt' - server-id: sonatype-nexus-staging - server-username: ${{ secrets.NEXUS_USERNAME }} - server-password: ${{ secrets.NEXUS_PASSWORD }} - gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD - name: Release Maven package - uses: samuelmeuli/action-maven-publish@v1 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} - nexus_username: ${{ secrets.NEXUS_USERNAME }} - nexus_password: ${{ secrets.NEXUS_PASSWORD }} - maven_args: -Dmaven.test.skip=false -Dmaven.javadoc.skip=false -Dgpg.skip=false \ No newline at end of file + run: mvn --batch-mode deploy + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} \ No newline at end of file From cd9873662d14dbfc602fc0f3ed01795b5d8ddd83 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 16:28:10 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E7=BC=93=E5=AD=98maven=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5fef4211..0c60418f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,6 +34,12 @@ jobs: server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD + - name: Cache Maven + uses: actions/cache@v3 + with: + path: ~/.m2 + key: m2 + restore-keys: m2 - name: Release Maven package run: mvn --batch-mode deploy env: From 108e5c6baa7d3a5c5abfa584ee6a12b6374c69aa Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 16:42:29 +0800 Subject: [PATCH 14/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 7 ++++--- .github/workflows/release.yml | 16 +++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 728e060e..69ba885a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,12 +36,13 @@ jobs: with: java-version: ${{ matrix.java }} distribution: ${{ matrix.distribution }} - - name: Cache Maven + - name: Cache local Maven m2 uses: actions/cache@v3 with: path: ~/.m2 - key: m2 - restore-keys: m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-m2 - name: Chmod run: chmod +x mvnw - name: Test with Maven diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c60418f..63b20d27 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,14 +34,20 @@ jobs: server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - - name: Cache Maven + - name: Cache local Maven m2 uses: actions/cache@v3 with: path: ~/.m2 - key: m2 - restore-keys: m2 - - name: Release Maven package - run: mvn --batch-mode deploy + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-m2 + - id: install-secret-key + name: Install GPG secret key + run: | + cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import + - name: Publish package + run: | + mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} clean deploy -Dmaven.test.skip=false -Dmaven.javadoc.skip=false -Dgpg.skip=false env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} \ No newline at end of file From 71613f874c1d5814130ac1cadfbd303f48680b2f Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 16:50:58 +0800 Subject: [PATCH 15/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 63b20d27..d3958e79 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: - id: install-secret-key name: Install GPG secret key run: | - cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import + cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") - name: Publish package run: | mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} clean deploy -Dmaven.test.skip=false -Dmaven.javadoc.skip=false -Dgpg.skip=false From b77409c8b80d08f56a4f05354de81d289516d30a Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 17:00:53 +0800 Subject: [PATCH 16/18] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 98 +++++++++++++++++------------------ .github/workflows/release.yml | 6 ++- 2 files changed, 53 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69ba885a..95ff72b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,53 +1,53 @@ +## +## Copyright 2009-2021 the original author or authors. +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## # -# Copyright 2009-2021 the original author or authors. +#name: Java CI # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +#on: [push, pull_request] # -# http://www.apache.org/licenses/LICENSE-2.0 +#jobs: +# test: +# runs-on: ubuntu-latest +# strategy: +# matrix: +# java: [ 8, 11, 17] +# distribution: [ 'adopt' ] +# fail-fast: false +# max-parallel: 4 +# name: Test JDK ${{ matrix.java }} # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -name: Java CI - -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - java: [ 8, 11, 17] - distribution: [ 'adopt' ] - fail-fast: false - max-parallel: 4 - name: Test JDK ${{ matrix.java }} - - steps: - - uses: actions/checkout@main - - name: Set up JDK - uses: actions/setup-java@main - with: - java-version: ${{ matrix.java }} - distribution: ${{ matrix.distribution }} - - name: Cache local Maven m2 - uses: actions/cache@v3 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-m2 - - name: Chmod - run: chmod +x mvnw - - name: Test with Maven - run: ./mvnw test -B -Dmaven.test.skip=false - - name: Maven Build - run: ./mvnw install -B -V - - name: Java Doc - run: ./mvnw javadoc:javadoc +# steps: +# - uses: actions/checkout@main +# - name: Set up JDK +# uses: actions/setup-java@main +# with: +# java-version: ${{ matrix.java }} +# distribution: ${{ matrix.distribution }} +# - name: Cache local Maven m2 +# uses: actions/cache@v3 +# with: +# path: ~/.m2 +# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} +# restore-keys: | +# ${{ runner.os }}-m2 +# - name: Chmod +# run: chmod +x mvnw +# - name: Test with Maven +# run: ./mvnw test -B -Dmaven.test.skip=false +# - name: Maven Build +# run: ./mvnw install -B -V +# - name: Java Doc +# run: ./mvnw javadoc:javadoc diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d3958e79..b2475e02 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,8 @@ name: Publish package to the Maven Central Repository + + on: release: types: [created] @@ -44,10 +46,10 @@ jobs: - id: install-secret-key name: Install GPG secret key run: | - cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") + cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import - name: Publish package run: | - mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} clean deploy -Dmaven.test.skip=false -Dmaven.javadoc.skip=false -Dgpg.skip=false + mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} clean deploy -Dmaven.test.skip=true -Dmaven.javadoc.skip=false -Dgpg.skip=false env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} \ No newline at end of file From 94a8c69ba784e7dc39a686e1e133e3f73fb87bdc Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 17:08:29 +0800 Subject: [PATCH 17/18] =?UTF-8?q?=E5=AE=8C=E6=88=90=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 98 ++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95ff72b6..69ba885a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,53 +1,53 @@ -## -## Copyright 2009-2021 the original author or authors. -## -## Licensed under the Apache License, Version 2.0 (the "License"); -## you may not use this file except in compliance with the License. -## You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## # -#name: Java CI +# Copyright 2009-2021 the original author or authors. # -#on: [push, pull_request] +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -#jobs: -# test: -# runs-on: ubuntu-latest -# strategy: -# matrix: -# java: [ 8, 11, 17] -# distribution: [ 'adopt' ] -# fail-fast: false -# max-parallel: 4 -# name: Test JDK ${{ matrix.java }} +# http://www.apache.org/licenses/LICENSE-2.0 # -# steps: -# - uses: actions/checkout@main -# - name: Set up JDK -# uses: actions/setup-java@main -# with: -# java-version: ${{ matrix.java }} -# distribution: ${{ matrix.distribution }} -# - name: Cache local Maven m2 -# uses: actions/cache@v3 -# with: -# path: ~/.m2 -# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} -# restore-keys: | -# ${{ runner.os }}-m2 -# - name: Chmod -# run: chmod +x mvnw -# - name: Test with Maven -# run: ./mvnw test -B -Dmaven.test.skip=false -# - name: Maven Build -# run: ./mvnw install -B -V -# - name: Java Doc -# run: ./mvnw javadoc:javadoc +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +name: Java CI + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ 8, 11, 17] + distribution: [ 'adopt' ] + fail-fast: false + max-parallel: 4 + name: Test JDK ${{ matrix.java }} + + steps: + - uses: actions/checkout@main + - name: Set up JDK + uses: actions/setup-java@main + with: + java-version: ${{ matrix.java }} + distribution: ${{ matrix.distribution }} + - name: Cache local Maven m2 + uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-m2 + - name: Chmod + run: chmod +x mvnw + - name: Test with Maven + run: ./mvnw test -B -Dmaven.test.skip=false + - name: Maven Build + run: ./mvnw install -B -V + - name: Java Doc + run: ./mvnw javadoc:javadoc From d755f10ad089c6634cbfa54c9a1a65b01cc69307 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 16 Nov 2022 17:09:57 +0800 Subject: [PATCH 18/18] =?UTF-8?q?=E5=AE=8C=E6=88=90=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1c0b667d..96d7f698 100644 --- a/pom.xml +++ b/pom.xml @@ -410,7 +410,7 @@ ossrh https://oss.sonatype.org/ - false + true