File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -37,29 +37,29 @@ jobs:
3737
3838 - name : Import GPG keys
3939 run : |
40- # Set up GPG directory with proper permissions
4140 mkdir -p ~/.gnupg
4241 chmod 700 ~/.gnupg
4342
44- # Configure gpg for CI use
43+ # Configure GPG for CI
4544 echo "use-agent" >> ~/.gnupg/gpg.conf
4645 echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
4746 echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
4847
49- # Import private key
48+ # Import the private key
5049 echo "${{ secrets.MAVEN_GPG_PRIVATE_KEY }}" | base64 --decode | gpg --batch --import
5150
52- # Set trust level (required or GPG won't sign)
53- GPG_KEY_ID =$(gpg --list-secret-keys --with-colons | grep '^sec' | cut -d':' -f5 )
54- echo "5:$GPG_KEY_ID:1 " | gpg --import-ownertrust
51+ # Extract and trust the fingerprint
52+ FINGERPRINT =$(gpg --with-colons -- list-secret-keys | awk -F: '/^fpr:/ { print $10; exit }' )
53+ echo "$FINGERPRINT:6: " | gpg --import-ownertrust
5554
56- # Fix permissions explicitly
55+ # Set permissions
5756 chmod 600 ~/.gnupg/*
5857 chmod 700 ~/.gnupg
5958
60- # Restart agent
59+ # Restart GPG agent
6160 gpgconf --kill gpg-agent
6261 echo RELOADAGENT | gpg-connect-agent
62+
6363 - name : Create settings.xml
6464 run : |
6565 echo "<settings xmlns=\"http://maven.apache.org/SETTINGS/1.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd\">
You can’t perform that action at this time.
0 commit comments