Skip to content

Commit 46b8232

Browse files
GH-257 attempting a few upgrades and configuration to get the signing to work (#260)
related issue : #257 see a few related discussions here * https://issues.apache.org/jira/browse/MGPG-90 * actions/setup-java#608
1 parent 449910e commit 46b8232

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

.github/workflows/maven-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ jobs:
184184

185185
steps:
186186
- name: Checkout code
187-
uses: actions/checkout@v3
187+
uses: actions/checkout@v6
188188
with:
189189
ref: aio-lib-java-${{ needs.tag.outputs.version }}
190190

191191
- name: Setup JDK
192-
uses: actions/setup-java@v3
192+
uses: actions/setup-java@v5
193193
with:
194194
distribution: 'temurin'
195195
java-version: 11
@@ -222,7 +222,7 @@ jobs:
222222
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
223223

224224
- name: Main Build
225-
run: mvn clean deploy -DskipTests
225+
run: mvn clean deploy -DskipTests -Prelease
226226
env:
227227
MAVEN_USERNAME: ${{ secrets.AIO_MAVEN_USER_NAME }}
228228
MAVEN_CENTRAL_TOKEN: ${{ secrets.AIO_MAVEN_TOKEN }}

.github/workflows/maven-snapshot.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v6
1616

1717
- name: Import GPG key
1818
env:
@@ -23,11 +23,12 @@ jobs:
2323
echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust --no-tty --batch --yes
2424
2525
- name: Setup JDK
26-
uses: actions/setup-java@v3
26+
uses: actions/setup-java@v5
2727
with:
2828
distribution: 'temurin'
2929
java-version: 11
3030
cache: maven
31+
server-id: central
3132
server-username: MAVEN_USERNAME
3233
server-password: MAVEN_CENTRAL_TOKEN
3334
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
@@ -48,7 +49,7 @@ jobs:
4849
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
4950

5051
- name: Main Build
51-
run: mvn clean deploy -DskipTests
52+
run: mvn clean deploy -DskipTests -Prelease
5253
env:
5354
MAVEN_USERNAME: ${{ secrets.AIO_MAVEN_USER_NAME }}
5455
MAVEN_CENTRAL_TOKEN: ${{ secrets.AIO_MAVEN_TOKEN }}

.mvn/settings.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@
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>
2234
<servers>
2335
<server>
2436
<id>central</id>

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@
455455
<plugin>
456456
<groupId>org.apache.maven.plugins</groupId>
457457
<artifactId>maven-gpg-plugin</artifactId>
458-
<version>3.1.0</version>
458+
<version>3.2.8</version>
459459
</plugin>
460460

461461
<plugin>
@@ -565,6 +565,7 @@
565565
<plugin>
566566
<groupId>org.apache.maven.plugins</groupId>
567567
<artifactId>maven-gpg-plugin</artifactId>
568+
<!-- Prevent gpg from using pinentry programs -->
568569
<configuration>
569570
<gpgArguments>
570571
<arg>--pinentry-mode</arg>

0 commit comments

Comments
 (0)