diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
deleted file mode 100644
index 3a23de8..0000000
--- a/.github/workflows/build.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: Go
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Create Key File
- run: echo "$GPG_PRIVATE_KEY" > private.key
- env:
- GPG_PRIVATE_KEY: ${{secrets.GPG_PRIVATE}}
- - name: Import GPG Key
- run: gpg --import --batch private.key
- - name: Set up Java
- uses: actions/setup-java@v4
- with:
- java-version: "17"
- distribution: "temurin"
- - name: Verify and test
- run: mvn --batch-mode --update-snapshots verify && mvn test
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 290b351..07923e2 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -15,18 +15,11 @@ jobs:
with:
java-version: "17"
distribution: "temurin"
- server-id: central
- server-username: MAVEN_USERNAME
- server-password: MAVEN_PASSWORD
- - name: Create Key File
- run: echo "$GPG_PRIVATE_KEY" > private.key
- env:
- GPG_PRIVATE_KEY: ${{secrets.GPG_PRIVATE}}
- - name: Import GPG Key
- run: gpg --import --batch private.key
- - name: Publish package
- run: mvn --batch-mode deploy
- env:
- MAVEN_USERNAME: ${{secrets.OSSRH_USERNAME}}
- MAVEN_PASSWORD: ${{secrets.OSSRH_TOKEN}}
- GPG_KEYNAME: ${{secrets.GPG_KEYNAME}}
+ - name: Release Maven package
+ uses: samuelmeuli/action-maven-publish@v1.4.0
+ with:
+ maven_profiles: deploy, verify
+ gpg_private_key: ${{secrets.GPG_PRIVATE}}
+ gpg_passphrase: ""
+ nexus_username: ${{secrets.OSSRH_USERNAME}}
+ nexus_password: ${{secrets.OSSRH_TOKEN}}
diff --git a/pom.xml b/pom.xml
index b8c1bf9..0cebe2a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,7 @@
- org.sonatype.centralcentral-publishing-maven-plugin0.4.0truecentraltruetrueorg.apache.maven.pluginsmaven-javadoc-plugin3.6.3attach-javadocsjarorg.apache.maven.pluginsmaven-source-plugin3.3.0attach-sourcesjarorg.apache.maven.pluginsmaven-gpg-plugin3.2.2sign-artifactsverifysign--batch--yes
+ org.sonatype.centralcentral-publishing-maven-plugin0.4.0truecentraltruetrueorg.apache.maven.pluginsmaven-javadoc-plugin3.6.3attach-javadocsjarorg.apache.maven.pluginsmaven-source-plugin3.3.0attach-sourcesjarorg.apache.maven.pluginsmaven-gpg-plugin3.2.2sign-artifactsverifysign--pinentry-modeloopback