From d1068c1fb6e9c73dfcefacc09d2d09fd1cc2c773 Mon Sep 17 00:00:00 2001 From: "felord.cn" Date: Thu, 18 Mar 2021 20:41:16 +0800 Subject: [PATCH 01/12] =?UTF-8?q?fix:=20=E6=94=AF=E4=BB=98=E5=88=86?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=88=90=E5=8A=9F=E5=9B=9E=E8=B0=83=E5=8F=8D?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E5=8C=96=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #21 --- .../java/cn/felord/payment/wechat/v3/WechatPayCallback.java | 2 ++ .../v3/model/busifavor/BusiFavorReceiveConsumeData.java | 2 +- .../wechat/v3/model/payscore/PayScoreUserPaidConsumeData.java | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatPayCallback.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatPayCallback.java index f232ddc..989675a 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatPayCallback.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatPayCallback.java @@ -31,6 +31,7 @@ import cn.felord.payment.wechat.v3.model.payscore.PayScoreUserPaidConsumeData; import cn.felord.payment.wechat.v3.model.payscore.PayScoreUserPermissionConsumeData; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.PropertyNamingStrategy; import com.fasterxml.jackson.databind.module.SimpleModule; @@ -73,6 +74,7 @@ public class WechatPayCallback { static { MAPPER.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE); MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL); + MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false); SimpleModule module = new JavaTimeModule(); MAPPER.registerModule(module); } diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/busifavor/BusiFavorReceiveConsumeData.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/busifavor/BusiFavorReceiveConsumeData.java index 2560165..57e0b02 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/busifavor/BusiFavorReceiveConsumeData.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/busifavor/BusiFavorReceiveConsumeData.java @@ -49,7 +49,7 @@ public class BusiFavorReceiveConsumeData { /** * 发放时间 rfc 3339 yyyy-MM-ddTHH:mm:ss+TIMEZONE */ - @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssXXX", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "GMT+8") private OffsetDateTime sendTime; /** * 微信用户在appid下的唯一标识。 diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/payscore/PayScoreUserPaidConsumeData.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/payscore/PayScoreUserPaidConsumeData.java index 6dc6f85..fc85599 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/payscore/PayScoreUserPaidConsumeData.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/payscore/PayScoreUserPaidConsumeData.java @@ -98,6 +98,10 @@ public class PayScoreUserPaidConsumeData { * The Time range. */ private TimeRange timeRange; + /** + * stateDescription + */ + private String stateDescription; /** * The Total amount. */ From e0eacd523e031d96053c34e5f0eabd2200e6fcef Mon Sep 17 00:00:00 2001 From: "felord.cn" Date: Tue, 23 Mar 2021 00:20:31 +0800 Subject: [PATCH 02/12] feat: upgrade to 1.0.9 --- README.md | 2 +- docs/README.md | 2 +- docs/quick_start.md | 2 +- payment-spring-boot-autoconfigure/pom.xml | 4 ++-- payment-spring-boot-starter/pom.xml | 4 ++-- pom.xml | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 40fc43f..dd9fc9c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ cn.felord payment-spring-boot-starter - 1.0.8.RELEASE + 1.0.9.RELEASE ``` diff --git a/docs/README.md b/docs/README.md index 613d61e..ad75c9b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -35,7 +35,7 @@ cn.felord payment-spring-boot-starter - 1.0.8.RELEASE + 1.0.9.RELEASE ``` ## 采用技术 diff --git a/docs/quick_start.md b/docs/quick_start.md index 30c3517..3683091 100644 --- a/docs/quick_start.md +++ b/docs/quick_start.md @@ -4,7 +4,7 @@ cn.felord payment-spring-boot-starter - 1.0.8.RELEASE + 1.0.9.RELEASE ``` > 基于 **Spring Boot 2.x** diff --git a/payment-spring-boot-autoconfigure/pom.xml b/payment-spring-boot-autoconfigure/pom.xml index bf75999..fd9ca57 100644 --- a/payment-spring-boot-autoconfigure/pom.xml +++ b/payment-spring-boot-autoconfigure/pom.xml @@ -5,11 +5,11 @@ cn.felord payment-spring-boot - 1.0.8.RELEASE + 1.0.9.RELEASE payment-spring-boot-autoconfigure - 1.0.8.RELEASE + 1.0.9.RELEASE jar 4.0.0 diff --git a/payment-spring-boot-starter/pom.xml b/payment-spring-boot-starter/pom.xml index 8b4898c..2a817cd 100644 --- a/payment-spring-boot-starter/pom.xml +++ b/payment-spring-boot-starter/pom.xml @@ -5,11 +5,11 @@ cn.felord payment-spring-boot - 1.0.8.RELEASE + 1.0.9.RELEASE payment-spring-boot-starter - 1.0.8.RELEASE + 1.0.9.RELEASE jar 4.0.0 diff --git a/pom.xml b/pom.xml index 2f2b4a2..e605e38 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> cn.felord payment-spring-boot - 1.0.8.RELEASE + 1.0.9.RELEASE pom 4.0.0 @@ -30,7 +30,7 @@ - payment-spring-boot-1.0.8.RELEASE + payment-spring-boot-1.0.9.RELEASE https://github.com/NotFound403/payment-spring-boot scm:git:https://github.com/NotFound403/payment-spring-boot.git scm:git:https://github.com/NotFound403/payment-spring-boot.git From 8d130e5df15ab5b4a02e2bd90e9164f128e8c3d9 Mon Sep 17 00:00:00 2001 From: "felord.cn" Date: Tue, 23 Mar 2021 00:25:44 +0800 Subject: [PATCH 03/12] fix: remove unused files --- .github/workflow/deployment.yaml | 34 -------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 .github/workflow/deployment.yaml diff --git a/.github/workflow/deployment.yaml b/.github/workflow/deployment.yaml deleted file mode 100644 index ac556cf..0000000 --- a/.github/workflow/deployment.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Maven Central Repo Deployment -# 当合并到release 分支的 -on: - create: - branches: - - release -jobs: - publish: - runs-on: ubuntu-latest - steps: - - 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: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - - id: install-secret-key - name: Install GPG Secret Key - run: | - cat <(echo -e "${{ secrets.GPG_PUB }}") | gpg --batch --import - gpg --list-secret-keys --keyid-format LONG - - id: publish-to-central - name: Publish to Maven Central Repo - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USER }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - run: | - mvn \ - --no-transfer-progress \ - --batch-mode \ - -Dgpg.passphrase=${{ secrets.GPG_PASSWORD }} \ - clean deploy From 54a0822c7331d020e65590e3e94cf93277c56b0d Mon Sep 17 00:00:00 2001 From: "felord.cn" Date: Tue, 23 Mar 2021 00:37:08 +0800 Subject: [PATCH 04/12] ci: github action support --- .github/workflows/main.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ac556cf..d1b7c52 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,9 +1,8 @@ name: Maven Central Repo Deployment -# 当合并到release 分支的 +# 当 release 的时候触发 on: - create: - branches: - - release + release: + types: [released] jobs: publish: runs-on: ubuntu-latest From 03fba59c49dda8fb13163ed21843cf7200d16f20 Mon Sep 17 00:00:00 2001 From: "felord.cn" Date: Tue, 23 Mar 2021 01:09:40 +0800 Subject: [PATCH 05/12] ci: github action support --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d1b7c52..2b56cb4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,7 @@ jobs: server-id: sonatype-nexus-staging server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD + gpg-passphrase: MAVEN_GPG_PASSPHRASE - id: install-secret-key name: Install GPG Secret Key run: | @@ -25,6 +26,7 @@ jobs: env: MAVEN_USERNAME: ${{ secrets.OSSRH_USER }} MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }} run: | mvn \ --no-transfer-progress \ From ace5a900d21f08e59d0e584ba0a5f2142b398666 Mon Sep 17 00:00:00 2001 From: "felord.cn" Date: Tue, 23 Mar 2021 21:09:46 +0800 Subject: [PATCH 06/12] ci: github action support --- .github/workflows/main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2b56cb4..d3b571e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,8 +1,11 @@ name: Maven Central Repo Deployment # 当 release 的时候触发 +#on: +# release: +# types: [released] on: - release: - types: [released] + push: + branches: [ release ] jobs: publish: runs-on: ubuntu-latest From aae5096349056df644e356256d29f85d6f0a46c4 Mon Sep 17 00:00:00 2001 From: "felord.cn" Date: Tue, 23 Mar 2021 21:19:01 +0800 Subject: [PATCH 07/12] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E5=B7=B2=E7=9F=A5Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wechat/enumeration/CouponBgColor.java | 42 +++++-------------- .../felord/payment/wechat/v3/AbstractApi.java | 14 ++++--- .../payment/wechat/v3/WechatPayCallback.java | 11 +++-- .../BusiFavorReceiveConsumeData.java | 2 +- 4 files changed, 24 insertions(+), 45 deletions(-) diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/CouponBgColor.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/CouponBgColor.java index 1cb4b7b..b85ee46 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/CouponBgColor.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/CouponBgColor.java @@ -29,64 +29,42 @@ public enum CouponBgColor { /** * Color 010 coupon bg color. */ - COLOR010("#63B359"), + Color010, /** * Color 020 coupon bg color. */ - COLOR020("#2C9F67"), + Color020, /** * Color 030 coupon bg color. */ - COLOR030("#509FC9"), + Color030, /** * Color 040 coupon bg color. */ - COLOR040("#5885CF"), + Color040, /** * Color 050 coupon bg color. */ - COLOR050("#9062C0"), + Color050, /** * Color 060 coupon bg color. */ - COLOR060("#D09A45"), + Color060, /** * Color 070 coupon bg color. */ - COLOR070("#E4B138"), + Color070, /** * Color 080 coupon bg color. */ - COLOR080("#EE903C"), + Color080, /** * Color 090 coupon bg color. */ - COLOR090("#DD6549"), + Color090, /** * Color 100 coupon bg color. */ - COLOR100("#CC463D"); + Color100 - /** - * The Color. - */ - private final String color; - - /** - * Instantiates a new Coupon bg color. - * - * @param color the color - */ - CouponBgColor(String color) { - this.color = color; - } - - /** - * Color string. - * - * @return the string - */ - public String color() { - return this.color; - } } diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/AbstractApi.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/AbstractApi.java index 270339d..9e12c19 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/AbstractApi.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/AbstractApi.java @@ -24,9 +24,9 @@ import cn.felord.payment.wechat.v3.model.FundFlowBillParams; import cn.felord.payment.wechat.v3.model.TradeBillParams; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.PropertyNamingStrategy; -import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import org.springframework.core.io.Resource; import org.springframework.http.HttpHeaders; @@ -88,10 +88,11 @@ public abstract class AbstractApi { * @param mapper the mapper */ private void applyObjectMapper(ObjectMapper mapper) { - mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE); - mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - SimpleModule module = new JavaTimeModule(); - mapper.registerModule(module); + mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false) + .configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true) + .setSerializationInclusion(JsonInclude.Include.NON_NULL) + .registerModule(new JavaTimeModule()); } @@ -185,10 +186,11 @@ public abstract class AbstractApi { return RequestEntity.get(uri).header("Pay-TenantId", tenantId) .build(); } + /** * 构建Get请求对象. * - * @param uri the uri + * @param uri the uri * @param httpHeaders the http headers * @return the request entity */ diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatPayCallback.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatPayCallback.java index 989675a..77d41df 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatPayCallback.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatPayCallback.java @@ -34,7 +34,6 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.PropertyNamingStrategy; -import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -72,11 +71,11 @@ public class WechatPayCallback { private final String tenantId; static { - MAPPER.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE); - MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL); - MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false); - SimpleModule module = new JavaTimeModule(); - MAPPER.registerModule(module); + MAPPER.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE) + .setSerializationInclusion(JsonInclude.Include.NON_NULL) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false) + .configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT,true) + .registerModule(new JavaTimeModule()); } /** diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/busifavor/BusiFavorReceiveConsumeData.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/busifavor/BusiFavorReceiveConsumeData.java index 57e0b02..2560165 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/busifavor/BusiFavorReceiveConsumeData.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/busifavor/BusiFavorReceiveConsumeData.java @@ -49,7 +49,7 @@ public class BusiFavorReceiveConsumeData { /** * 发放时间 rfc 3339 yyyy-MM-ddTHH:mm:ss+TIMEZONE */ - @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssXXX", timezone = "GMT+8") private OffsetDateTime sendTime; /** * 微信用户在appid下的唯一标识。 From 73b19fcc0a9c92de8fcc1c350759b1dea13a13b2 Mon Sep 17 00:00:00 2001 From: "felord.cn" Date: Tue, 23 Mar 2021 21:58:55 +0800 Subject: [PATCH 08/12] ci: github action support --- .github/workflows/main.yml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d3b571e..a4dbaa4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,8 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout Git Repo + uses: actions/checkout@v2 - name: Set up Maven Central Repo uses: actions/setup-java@v1 with: @@ -19,20 +20,16 @@ jobs: server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD gpg-passphrase: MAVEN_GPG_PASSPHRASE - - id: install-secret-key - name: Install GPG Secret Key - run: | - cat <(echo -e "${{ secrets.GPG_PUB }}") | gpg --batch --import - gpg --list-secret-keys --keyid-format LONG - - id: publish-to-central - name: Publish to Maven Central Repo + - name: Publish to Maven Central Repo + uses: samuelmeuli/action-maven-publish@v1 env: MAVEN_USERNAME: ${{ secrets.OSSRH_USER }} MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }} - run: | - mvn \ - --no-transfer-progress \ - --batch-mode \ - -Dgpg.passphrase=${{ secrets.GPG_PASSWORD }} \ - clean deploy + GPG_SECRET_KEY: ${{ secrets.GPG_PUB }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }} + with: + gpg_private_key: GPG_SECRET_KEY + gpg_passphrase: MAVEN_GPG_PASSPHRASE + nexus_username: MAVEN_USERNAME + nexus_password: MAVEN_PASSWORD + From 01b9fc3aa05915d88f4499f9cb99091f568a4e83 Mon Sep 17 00:00:00 2001 From: "felord.cn" Date: Tue, 23 Mar 2021 22:03:07 +0800 Subject: [PATCH 09/12] ci: github action support --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a4dbaa4..612f110 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,7 @@ jobs: GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }} with: gpg_private_key: GPG_SECRET_KEY - gpg_passphrase: MAVEN_GPG_PASSPHRASE + gpg_passphrase: GPG_PASSPHRASE nexus_username: MAVEN_USERNAME nexus_password: MAVEN_PASSWORD From 02ce523cde536ca9ad256dd773c7d988d6a5f17a Mon Sep 17 00:00:00 2001 From: "felord.cn" Date: Tue, 23 Mar 2021 22:47:40 +0800 Subject: [PATCH 10/12] ci: github action support --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 612f110..b346ed4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: env: MAVEN_USERNAME: ${{ secrets.OSSRH_USER }} MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - GPG_SECRET_KEY: ${{ secrets.GPG_PUB }} + GPG_SECRET_KEY: ${{ secrets.GPG_SECRET }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }} with: gpg_private_key: GPG_SECRET_KEY From f0c0b64a93c015d3b4cbc8e36b409a8fc04d653d Mon Sep 17 00:00:00 2001 From: "felord.cn" Date: Tue, 23 Mar 2021 22:52:13 +0800 Subject: [PATCH 11/12] ci: github action support --- .github/workflows/main.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b346ed4..2693e3b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: publish: runs-on: ubuntu-latest steps: - - name: Checkout Git Repo + - name: Checkout uses: actions/checkout@v2 - name: Set up Maven Central Repo uses: actions/setup-java@v1 @@ -22,14 +22,9 @@ jobs: gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Publish to Maven Central Repo uses: samuelmeuli/action-maven-publish@v1 - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USER }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - GPG_SECRET_KEY: ${{ secrets.GPG_SECRET }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }} with: - gpg_private_key: GPG_SECRET_KEY - gpg_passphrase: GPG_PASSPHRASE - nexus_username: MAVEN_USERNAME - nexus_password: MAVEN_PASSWORD + gpg_private_key: ${{ secrets.GPG_SECRET }} + gpg_passphrase: ${{ secrets.GPG_PASSWORD }} + nexus_username: ${{ secrets.OSSRH_USER }} + nexus_password: ${{ secrets.OSSRH_PASSWORD }} From 77d80588fb7ee7ee132ffee335fb4be99e1534c2 Mon Sep 17 00:00:00 2001 From: "felord.cn" Date: Tue, 23 Mar 2021 22:52:13 +0800 Subject: [PATCH 12/12] ci: github action support --- .github/workflows/main.yml | 15 ++++------- pom.xml | 53 +++++++++++++++++++++++++------------- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b346ed4..2693e3b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: publish: runs-on: ubuntu-latest steps: - - name: Checkout Git Repo + - name: Checkout uses: actions/checkout@v2 - name: Set up Maven Central Repo uses: actions/setup-java@v1 @@ -22,14 +22,9 @@ jobs: gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Publish to Maven Central Repo uses: samuelmeuli/action-maven-publish@v1 - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USER }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - GPG_SECRET_KEY: ${{ secrets.GPG_SECRET }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }} with: - gpg_private_key: GPG_SECRET_KEY - gpg_passphrase: GPG_PASSPHRASE - nexus_username: MAVEN_USERNAME - nexus_password: MAVEN_PASSWORD + gpg_private_key: ${{ secrets.GPG_SECRET }} + gpg_passphrase: ${{ secrets.GPG_PASSWORD }} + nexus_username: ${{ secrets.OSSRH_USER }} + nexus_password: ${{ secrets.OSSRH_PASSWORD }} diff --git a/pom.xml b/pom.xml index e605e38..321a539 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,33 @@ scm:git:https://github.com/NotFound403/payment-spring-boot.git + + + + ossrh + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + org.sonatype.plugins + nexus-staging-maven-plugin + + + + org.apache.maven.plugins + maven-gpg-plugin + + + + + payment-spring-boot-autoconfigure @@ -173,10 +200,18 @@ 1.6 + sign-artifacts verify sign + + + + --pinentry-mode + loopback + + @@ -192,23 +227,5 @@ - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-javadoc-plugin - - - org.apache.maven.plugins - maven-gpg-plugin - - - org.sonatype.plugins - nexus-staging-maven-plugin - - \ No newline at end of file