diff --git a/.github/workflows/maven.yml b/.github/workflows/pullrequest.yml
similarity index 64%
rename from .github/workflows/maven.yml
rename to .github/workflows/pullrequest.yml
index 91bc2721..d06f30ca 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/pullrequest.yml
@@ -1,14 +1,9 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
-name: maven
+name: maven-build
on:
- push:
- branches:
- - master
- - 'releases/*'
- - 'refs/tags/*'
pull_request:
branches:
- master
@@ -27,9 +22,11 @@ jobs:
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
+ - name: Build
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
- run: |
- mvn clean verify -Pcoverage -Ppack --file pom.xml --batch-mode -Dsytle.colors=always --errors
- bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN -F unittests -f ./target/site/jacoco/jacoco.xml -n codecov-umbrella
+ run: mvn -B package --file pom.xml -Pcoverage -Dsytle.colors=always --errors
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v1
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..9417408c
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,42 @@
+# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
+# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
+
+name: maven-release
+
+on:
+ push:
+ branches:
+ - master
+ - 'releases/*'
+ - 'refs/tags/*'
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up JDK 1.11
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.11
+ 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
+ env:
+ CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
+ run: mvn -B package --file pom.xml -Pcoverage -Dsytle.colors=always --errors
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v1
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ - name: Release
+ # if: github.event_name == 'push' && github.ref == 'refs/heads/master'
+ 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 114bd36d..541452ad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -247,7 +247,7 @@
-
+
coverage
@@ -302,8 +302,88 @@
-
-
+
+
+
+ deploy
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.6
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+ --batch
+ --pinentry-mode
+ loopback
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.2.0
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+ ${project.build.sourceDirectory}:${project.build.directory}/generated-sources/annotations
+
+
+ javax.annotation
+ javax.annotation-api
+ 1.3.2
+
+
+
+ none
+
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.8
+ true
+
+ ossrh
+ https://oss.sonatype.org/
+ true
+
+
+
+
+
+
@@ -328,50 +408,16 @@
2.19.1
- org.apache.maven.plugins
- maven-source-plugin
- 3.0.1
-
-
- attach-sources
-
- jar
-
-
-
-
-
- maven-javadoc-plugin
- 3.0.1
-
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.7
+ true
- ${project.build.sourceDirectory}:${project.build.directory}/generated-sources/annotations
-
-
- javax.annotation
- javax.annotation-api
- 1.3.2
-
-
-
- none
+ ossrh
+ https://oss.sonatype.org/
+ true
-
- maven-release-plugin
- 2.5.3
-
- v@{project.version}
- true
-
-
-
- org.apache.maven.scm
- maven-scm-provider-gitexe
- 1.9
-
-
-
maven-jar-plugin
3.0.2
@@ -433,6 +479,38 @@
${project.build.sourceDirectory}
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 3.2.3
+
+
+ package
+
+ shade
+
+
+
+
+ ${project.groupId}:${project.artifactId}
+ com.squareup.okhttp3
+ com.squareup.okio
+
+
+
+
+ okhttp3
+ ${shade.id}.okhttp3
+
+
+ okio
+ ${shade.id}.okio
+
+
+
+
+
+