File tree Expand file tree Collapse file tree 2 files changed +3
-32
lines changed
Expand file tree Collapse file tree 2 files changed +3
-32
lines changed Original file line number Diff line number Diff line change @@ -48,34 +48,17 @@ jobs:
4848 echo "pinentry-mode loopback" > ~/.gnupg/gpg.conf
4949 echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf
5050
51- - name : Start gpg-agent
52- run : |
53- gpg-agent --daemon --batch 2>/dev/null &
54- sleep 2
55- echo "GPG_AGENT_INFO=$GPG_AGENT_INFO"
56-
5751 - name : Import GPG key
5852 run : |
5953 echo "${{ secrets.GPG_PRIVATE_KEY }}" | base64 --decode > /tmp/private_key.asc
6054 gpg --batch --pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}" --import /tmp/private_key.asc || true
6155 rm -f /tmp/private_key.asc
6256 gpg --list-keys || true
63- gpg --list-secret-keys || true
64-
65- - name : Pre-cache passphrase in gpg-agent
66- run : |
67- /usr/libexec/gpg-preset-passphrase --preset --passphrase "${{ secrets.GPG_PASSPHRASE }}" BEFBA859508A8489 || \
68- echo "gpg-preset-passphrase not available, trying alternative method"
69- gpg --batch --pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}" --sign --detach-sign /tmp/testfile || true
70- rm -f /tmp/testfile /tmp/testfile.asc 2>/dev/null || true
7157
7258 - name : Build and Publish to Maven Central
7359 run : |
74- export GPG_TTY=$(tty)
75- echo "GPG_TTY=$GPG_TTY"
7660 mvn clean deploy -Pmaven-central -DskipTests \
77- -s .maven-settings.xml.template \
78- -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}"
61+ -s .maven-settings.xml.template
7962 env :
8063 MAVEN_USERNAME : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
8164 MAVEN_CENTRAL_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
Original file line number Diff line number Diff line change 437437 <plugin >
438438 <groupId >org.apache.maven.plugins</groupId >
439439 <artifactId >maven-gpg-plugin</artifactId >
440- <version >${maven-gpg-plugin.version} </version >
440+ <version >3.2.7 </version >
441441 <configuration >
442442 <keyname >BEFBA859508A8489</keyname >
443- <gpgArguments >
444- <arg >--pinentry-mode</arg >
445- <arg >loopback</arg >
446- <arg >--batch</arg >
447- <arg >--yes</arg >
448- </gpgArguments >
449443 </configuration >
450444 <executions >
451445 <execution >
500494 <plugin >
501495 <groupId >org.apache.maven.plugins</groupId >
502496 <artifactId >maven-gpg-plugin</artifactId >
503- <version >${maven-gpg-plugin.version} </version >
497+ <version >3.2.7 </version >
504498 <configuration >
505499 <keyname >BEFBA859508A8489</keyname >
506- <gpgArguments >
507- <arg >--pinentry-mode</arg >
508- <arg >loopback</arg >
509- <arg >--batch</arg >
510- <arg >--yes</arg >
511- </gpgArguments >
512500 </configuration >
513501 <executions >
514502 <execution >
You can’t perform that action at this time.
0 commit comments