Skip to content

Commit a2f4cf0

Browse files
committed
Fix GPG signing: passphrase support, batch mode for CI
1 parent 2faeaad commit a2f4cf0

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ jobs:
4646
server-username: CENTRAL_USERNAME
4747
server-password: CENTRAL_PASSWORD
4848
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
49+
gpg-passphrase: GPG_PASSPHRASE
4950

5051
- name: Publish
5152
run: mvn -B deploy -DskipTests
5253
env:
5354
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
5455
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
56+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@
111111
<goals><goal>sign</goal></goals>
112112
</execution>
113113
</executions>
114+
<configuration>
115+
<gpgArguments>
116+
<arg>--batch</arg>
117+
<arg>--pinentry-mode</arg>
118+
<arg>loopback</arg>
119+
</gpgArguments>
120+
</configuration>
114121
</plugin>
115122

116123
<!-- Central publishing plugin -->

0 commit comments

Comments
 (0)