diff --git a/.github/workflows/autorelease.yml b/.github/workflows/autorelease.yml
new file mode 100644
index 0000000..0d0f10e
--- /dev/null
+++ b/.github/workflows/autorelease.yml
@@ -0,0 +1,31 @@
+name: "tagged-release"
+
+on:
+ push:
+ tags:
+ - "v*"
+
+jobs:
+ tagged-release:
+ name: "Tagged Release"
+ runs-on: "ubuntu-latest"
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up JDK 11
+ uses: actions/setup-java@v3
+ with:
+ java-version: '11'
+ distribution: 'temurin'
+ cache: maven
+ - name: Build with Maven
+ run: mvn compile assembly:single
+
+ - name: auto release
+ uses: "marvinpinto/action-automatic-releases@latest"
+ with:
+ repo_token: "${{ secrets.GITHUB_TOKEN }}"
+ prerelease: false
+ files: |
+ LICENSE
+ target/*.jar
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 0000000..a9d525b
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,26 @@
+# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
+# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
+
+name: Java CI with Maven
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up JDK 11
+ uses: actions/setup-java@v3
+ with:
+ java-version: '11'
+ distribution: 'temurin'
+ cache: maven
+ - name: Build with Maven
+ run: mvn -B package --file pom.xml -Dmaven.test.failure.ignore=true
diff --git a/pom.xml b/pom.xml
index 409c72c..6a07310 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,12 +6,20 @@
com.elias
CertificateDownloader
- 1.1-SNAPSHOT
+ 1.2.0
+
+
+ 1.8
+ UTF-8
+ UTF-8
+
+
org.apache.maven.plugins
maven-compiler-plugin
+ 3.3
8
@@ -44,44 +52,38 @@
-
-
- jitpack.io
- https://jitpack.io
-
-
com.github.wechatpay-apiv3
wechatpay-apache-httpclient
- 0.1.4-SNAPSHOT
+ 0.4.7
info.picocli
picocli
- 4.0.1
+ 4.6.3
com.google.code.gson
gson
- 2.8.9
+ 2.9.0
junit
junit
- 4.13.1
+ 4.13.2
org.projectlombok
lombok
- 1.18.8
+ 1.18.24
org.slf4j
slf4j-simple
- 1.7.26
+ 1.7.36
-
\ No newline at end of file
+
diff --git a/src/main/java/com/elias/CertificateDownloader.java b/src/main/java/com/elias/CertificateDownloader.java
index 519407a..657fea6 100644
--- a/src/main/java/com/elias/CertificateDownloader.java
+++ b/src/main/java/com/elias/CertificateDownloader.java
@@ -12,7 +12,6 @@
import com.wechat.pay.contrib.apache.httpclient.auth.WechatPay2Validator;
import com.wechat.pay.contrib.apache.httpclient.util.AesUtil;
import com.wechat.pay.contrib.apache.httpclient.util.PemUtil;
-import org.apache.http.HttpResponse;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
@@ -20,7 +19,6 @@
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
-import sun.security.x509.X509CertImpl;
import java.io.*;
import java.nio.charset.StandardCharsets;