Error while using maven-gpg-plugin after setting GPG data

Description:
I set my GPG private key and passphrase through setup-java action, the problem is, the maven-gpg-plugin seems to fail at retrieving them from settings.xml prompting the following message: gpg: Sorry, no terminal at all requested - can't get input.

Task version:
actions/setup-java@v3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
I am currently trying to make it work on this repo.
The GitHub Actions workflow file can be found here and the pom.xml file at the root of the repository.