Skip to content

Commit e0051eb

Browse files
committed
fix(workflow): melhorar inicialização do gpg-agent e adicionar debug
- Executa gpg-agent em background com & - Adiciona GPG_TTY para evitar problemas deTTY - Adiciona debug (-X) no Maven para identificar onde trava
1 parent 71e871e commit e0051eb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/publish-maven-central.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ jobs:
5050
5151
- name: Start gpg-agent
5252
run: |
53-
gpg-agent --daemon --batch 2>/dev/null || true
53+
gpg-agent --daemon --batch 2>/dev/null &
54+
sleep 2
55+
echo "GPG_AGENT_INFO=$GPG_AGENT_INFO"
5456
5557
- name: Import GPG key
5658
run: |
@@ -62,11 +64,14 @@ jobs:
6264
6365
- name: Build and Publish to Maven Central
6466
run: |
67+
export GPG_TTY=$(tty)
68+
echo "GPG_TTY=$GPG_TTY"
6569
mvn clean deploy -Pmaven-central -DskipTests \
6670
-s .maven-settings.xml.template \
6771
-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} \
6872
-Dgpg.pinentry-mode=loopback \
69-
-Dgpg.batch=true
73+
-Dgpg.batch=true \
74+
-X
7075
env:
7176
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
7277
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}

0 commit comments

Comments
 (0)