Skip to content

Commit a02c5e7

Browse files
committed
Simplify GPG configuration and downgrade maven-gpg-plugin
1 parent ead5cdc commit a02c5e7

File tree

2 files changed

+11
-34
lines changed

2 files changed

+11
-34
lines changed

.github/workflows/maven-central.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -38,45 +38,12 @@ jobs:
3838
default-key ${{ secrets.GPG_KEYNAME }}
3939
use-agent
4040
pinentry-mode loopback
41-
trust-model always
42-
debug-level guru
43-
verbose
4441
EOF
4542
46-
cat > ~/.gnupg/gpg-agent.conf << EOF
47-
allow-loopback-pinentry
48-
default-cache-ttl 600
49-
max-cache-ttl 7200
50-
debug-level guru
51-
verbose
52-
EOF
53-
54-
# Set trust level directly
55-
echo "Setting trust level..."
56-
gpg --batch --yes --trust-model always --import-ownertrust < <(echo "${{ secrets.GPG_KEYNAME }}:6:")
57-
58-
# Restart GPG agent
59-
echo "Restarting GPG agent..."
60-
gpgconf --kill gpg-agent
61-
gpg-agent --daemon
62-
6343
# Debug information
64-
echo "=== GPG Configuration ==="
65-
cat ~/.gnupg/gpg.conf
66-
echo "=== GPG Agent Configuration ==="
67-
cat ~/.gnupg/gpg-agent.conf
6844
echo "=== GPG Keys ==="
6945
gpg --list-secret-keys --keyid-format LONG
7046
gpg --list-keys --keyid-format LONG
71-
echo "=== GPG Version ==="
72-
gpg --version
73-
echo "=== GPG Directories ==="
74-
gpgconf --list-dirs
75-
echo "=== GPG Trust ==="
76-
gpg --list-ownertrust
77-
echo "=== GPG Agent Status ==="
78-
gpgconf --list-dirs agent-socket
79-
gpg-agent --version
8047
8148
- name: Build and Publish
8249
env:

pom.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,24 @@
179179
<plugin>
180180
<groupId>org.apache.maven.plugins</groupId>
181181
<artifactId>maven-gpg-plugin</artifactId>
182-
<version>3.1.0</version>
182+
<version>3.0.1</version>
183183
<executions>
184184
<execution>
185185
<id>sign-artifacts</id>
186186
<phase>verify</phase>
187187
<goals>
188188
<goal>sign</goal>
189189
</goals>
190+
<configuration>
191+
<keyname>${gpg.keyname}</keyname>
192+
<passphrase>${gpg.passphrase}</passphrase>
193+
<gpgArguments>
194+
<arg>--batch</arg>
195+
<arg>--yes</arg>
196+
<arg>--pinentry-mode</arg>
197+
<arg>loopback</arg>
198+
</gpgArguments>
199+
</configuration>
190200
</execution>
191201
</executions>
192202
</plugin>

0 commit comments

Comments
 (0)