Skip to content

Commit 503101b

Browse files
GH-257 updating to adhere to the latest recommended configuration for GPG signing (#261)
see the related issue #257 see the related docs PR actions/setup-java#608
1 parent 37cd552 commit 503101b

File tree

3 files changed

+6
-32
lines changed

3 files changed

+6
-32
lines changed

.github/workflows/maven-snapshot.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v6
1616

17-
- name: Import GPG key
18-
env:
19-
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
20-
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }}
21-
run: |
22-
echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes
23-
echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust --no-tty --batch --yes
24-
2517
- name: Setup JDK
2618
uses: actions/setup-java@v5
2719
with:
@@ -31,27 +23,28 @@ jobs:
3123
server-id: central
3224
server-username: MAVEN_USERNAME
3325
server-password: MAVEN_CENTRAL_TOKEN
34-
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
35-
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3626

3727
- name: AEM6.5 Build
38-
run: mvn clean deploy -DskipTests -Paem65deps,aem65,release
28+
run: mvn clean deploy -DskipTests -Paem65deps,aem65,release -Dgpg.signer=bc
3929
env:
4030
MAVEN_USERNAME: ${{ secrets.AIO_MAVEN_USER_NAME }}
4131
MAVEN_CENTRAL_TOKEN: ${{ secrets.AIO_MAVEN_TOKEN }}
4232
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
33+
MAVEN_GPG_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
4334

4435
- name: AEMaaCS Build
45-
run: mvn clean deploy -PaemaacsDeps,aemaacs,release,attach-javadoc,attach-source
36+
run: mvn clean deploy -PaemaacsDeps,aemaacs,release,attach-javadoc,attach-source -Dgpg.signer=bc
4637
env:
4738
MAVEN_USERNAME: ${{ secrets.AIO_MAVEN_USER_NAME }}
4839
MAVEN_CENTRAL_TOKEN: ${{ secrets.AIO_MAVEN_TOKEN }}
4940
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
41+
MAVEN_GPG_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
5042

5143
- name: Main Build
52-
run: mvn clean deploy -DskipTests -Prelease
44+
run: mvn clean deploy -DskipTests -Prelease -Dgpg.signer=bc
5345
env:
5446
MAVEN_USERNAME: ${{ secrets.AIO_MAVEN_USER_NAME }}
5547
MAVEN_CENTRAL_TOKEN: ${{ secrets.AIO_MAVEN_TOKEN }}
5648
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
49+
MAVEN_GPG_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
5750

.mvn/settings.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@
1919
-->
2020
<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 http://maven.apache.org/xsd/settings-1.0.0.xsd">
2121
<interactiveMode>false</interactiveMode>
22-
<profiles>
23-
<profile>
24-
<id>signing</id>
25-
<activation>
26-
<activeByDefault>true</activeByDefault>
27-
</activation>
28-
<properties>
29-
<gpg.executable>gpg</gpg.executable>
30-
<gpg.passphrase>${env.MAVEN_GPG_PASSPHRASE}</gpg.passphrase>
31-
</properties>
32-
</profile>
33-
</profiles>
3422
<servers>
3523
<server>
3624
<id>central</id>

pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -565,13 +565,6 @@
565565
<plugin>
566566
<groupId>org.apache.maven.plugins</groupId>
567567
<artifactId>maven-gpg-plugin</artifactId>
568-
<!-- Prevent gpg from using pinentry programs -->
569-
<configuration>
570-
<gpgArguments>
571-
<arg>--pinentry-mode</arg>
572-
<arg>loopback</arg>
573-
</gpgArguments>
574-
</configuration>
575568
<executions>
576569
<execution>
577570
<id>sign-artifacts</id>

0 commit comments

Comments
 (0)