From 1b63244659ddbc4cf11159a0d2d65552ca0bf870 Mon Sep 17 00:00:00 2001 From: Shawn Date: Sat, 19 Mar 2022 00:50:59 +0800 Subject: [PATCH] change:add gpg sign --- .github/workflows/maven-publish.yml | 10 ++-- README.md | 2 +- pom.xml | 48 ++++++++++++++++++- ...dunclientDemo.java => UdunClientDemo.java} | 2 +- 4 files changed, 55 insertions(+), 7 deletions(-) rename src/test/java/{UdunclientDemo.java => UdunClientDemo.java} (98%) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 5828779..7a38e96 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -24,10 +24,12 @@ jobs: distribution: 'temurin' server-id: github # Value of the distributionManagement/repository/id field of the pom.xml settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Build with Maven - run: mvn -B package --file pom.xml - + - name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@v4 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} - name: Publish to GitHub Packages Apache Maven run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml env: diff --git a/README.md b/README.md index 3d842a8..111f193 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ ``` -3. 具体用法参考 https://github.com/uduncloud/java-wallet-sdk/blob/main/src/test/java/UdunclientDemo.java +3. 具体用法参考 https://github.com/uduncloud/java-wallet-sdk/blob/main/src/test/java/UdunClientDemo.java 4. 所有支持方法参考 https://github.com/uduncloud/java-wallet-sdk/blob/main/src/main/java/com/udun/sdk/client/UdunApi.java ## 三、关于回调 diff --git a/pom.xml b/pom.xml index 46a7e7d..cb8be68 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.uduncloud udun-sdk - 2.1.0 + 2.1.1 @@ -19,6 +19,46 @@ 11 11 + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.0 + + + package + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + + + https://github.com/uduncloud/udun-sdk-java + @@ -26,6 +66,12 @@ GitHub Uduncloud Apache Maven Packages https://maven.pkg.github.com/uduncloud/udun-sdk-java + + \ No newline at end of file diff --git a/src/test/java/UdunclientDemo.java b/src/test/java/UdunClientDemo.java similarity index 98% rename from src/test/java/UdunclientDemo.java rename to src/test/java/UdunClientDemo.java index 470d955..caa810f 100644 --- a/src/test/java/UdunclientDemo.java +++ b/src/test/java/UdunClientDemo.java @@ -6,7 +6,7 @@ import java.math.BigDecimal; import java.util.List; -public class UdunclientDemo { +public class UdunClientDemo { public static void main(String[] args) { //初始化 UdunClient udunClient = new UdunClient("https://hd03-node.uduncloud.com",