diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3880618..e73741c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,15 @@ jobs: distribution: 'temurin' java-version: '21' + - name: Import GPG Key + run: | + echo "${{ secrets.GPG_PRIVATE_KEY }}" | base64 --decode | gpg --batch --import + echo "${{ secrets.GPG_KEY_ID }}" > key_id + gpg --batch --import-ownertrust < key_id + env: + GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + - name: Setup Maven Settings uses: s4u/maven-settings-action@v3.0.0 with: @@ -35,7 +44,7 @@ jobs: - name: Package with Maven run: mvn versions:set -DnewVersion=${{ env.RELEASE_VERSION }} && mvn package -DskipTests - - name: Publish to GitHub Packages + - name: Deploy Github and Maven Central run: mvn deploy env: GITHUB_USERNAME: ${{ secrets.GITHUB_ACTOR }} diff --git a/pom.xml b/pom.xml index 0daa185..633de0b 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,8 @@ 4.0.0.4121 jacoco reuseReports - ${project.build.directory}/site/jacoco/jacoco.xml + ${project.build.directory}/site/jacoco/jacoco.xml + java 0.5.0 @@ -46,6 +47,23 @@ + + + tomaytotomato + Your Name + dev@tomaytotomato.com + + + + https://github.com/tomaytotomato/location4j + + + scm:git:https://github.com/tomaytotomato/location4j.git + scm:git:ssh://git@github.com:tomaytotomato/location4j.git + + https://github.com/tomaytotomato/location4j + + com.fasterxml.jackson.core @@ -75,23 +93,6 @@ ${assertj-core.version} test - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - org.jacoco - jacoco-maven-plugin - ${jacoco-maven-plugin.version} - - - org.sonarsource.scanner.maven - sonar-maven-plugin - ${sonar-maven-plugin.version} - @@ -135,17 +136,55 @@ - - org.sonatype.central - central-publishing-maven-plugin - ${central-publishing-maven-plugin.version} - true - - central - - - + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.4.1 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.central + central-publishing-maven-plugin + ${central-publishing-maven-plugin.version} + true + + central + + -