Skip to content

Commit 19f6a41

Browse files
committed
configure non-interactive GPG signing for automated releases
1 parent 5e264dc commit 19f6a41

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ jobs:
2828
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
2929

3030
- name: Build and publish (Central Publishing)
31+
env:
32+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3133
run: mvn -P release -DskipTests -B -V clean deploy

pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,14 @@
124124
<groupId>org.apache.maven.plugins</groupId>
125125
<artifactId>maven-gpg-plugin</artifactId>
126126
<version>3.2.4</version>
127+
<configuration>
128+
<!-- Use non-interactive loopback and read passphrase from env var provided by actions/setup-java -->
129+
<gpgArguments>
130+
<arg>--pinentry-mode</arg>
131+
<arg>loopback</arg>
132+
</gpgArguments>
133+
<passphrase>${env.GPG_PASSPHRASE}</passphrase>
134+
</configuration>
127135
<executions>
128136
<execution>
129137
<id>sign-artifacts</id>

0 commit comments

Comments
 (0)