Skip to content

Commit ad0a5f8

Browse files
committed
chore: gpg back
1 parent 923b878 commit ad0a5f8

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/mvn_publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ jobs:
3030
server-id: ossrh
3131
server-username: MAVEN_USERNAME
3232
server-password: MAVEN_PASSWORD
33+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
34+
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
3335

3436
- name: Build with Maven
3537
run: mvn clean deploy --batch-mode -DskipTests -P release -B -U -e
3638
env:
3739
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
3840
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
41+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292

9393
<!-- plugins -->
9494
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
95+
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
9596
<maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
9697
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
9798
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
@@ -287,6 +288,26 @@
287288
<autoReleaseAfterClose>true</autoReleaseAfterClose>
288289
</configuration>
289290
</plugin>
291+
<plugin>
292+
<groupId>org.apache.maven.plugins</groupId>
293+
<artifactId>maven-gpg-plugin</artifactId>
294+
<version>${maven-gpg-plugin.version}</version>
295+
<executions>
296+
<execution>
297+
<id>sign-artifacts</id>
298+
<goals>
299+
<goal>sign</goal>
300+
</goals>
301+
<phase>verify</phase>
302+
<configuration>
303+
<gpgArguments>
304+
<arg>--pinentry-mode</arg>
305+
<arg>loopback</arg>
306+
</gpgArguments>
307+
</configuration>
308+
</execution>
309+
</executions>
310+
</plugin>
290311
<plugin>
291312
<groupId>org.apache.maven.plugins</groupId>
292313
<artifactId>maven-source-plugin</artifactId>

0 commit comments

Comments
 (0)