diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 4df97484..3072ffd3 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -17,15 +17,16 @@ jobs: server-username: 'OSSRH_USER' server-password: 'OSSRH_PASSWORD' gpg-passphrase: 'GPG_PASSWORD' - gpg-private-key: ${{ secrets.GPG_SECRET }} - name: debug settings.xml run: cat /home/runner/.m2/settings.xml + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_SECRET }} + passphrase: ${{ secrets.GPG_PASSWORD }} - name: Publish to Maven Central Repo - run: | - echo -n "$GPG_SECRET" | base64 --decode | gpg --import - mvn clean deploy --batch-mode --activate-profiles deploy + run: mvn clean deploy --batch-mode --activate-profiles deploy env: OSSRH_USER: ${{ secrets.OSSRH_USER }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} - GPG_SECRET: ${{ secrets.GPG_SECRET }}