Skip to content

Commit 67e95f7

Browse files
committed
Added gpg plugin
1 parent a26ab29 commit 67e95f7

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/pre-release-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
server-id: ossrh
2424
server-username: MAVEN_USERNAME
2525
server-password: MAVEN_PASSWORD
26+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
2627
- name: Deploy pre-release version to the Maven Central Repository
2728
run: |
2829
pre_release_version=${{ github.event.release.tag_name }}
@@ -33,6 +34,7 @@ jobs:
3334
env:
3435
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
3536
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
37+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
3638
- name: Set up Java for publishing to GitHub Packages
3739
uses: actions/setup-java@v1
3840
with:

pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,18 @@
275275
</execution>
276276
</executions>
277277
</plugin>
278+
<plugin>
279+
<artifactId>maven-gpg-plugin</artifactId>
280+
<version>${maven-gpg-plugin.version}</version>
281+
<executions>
282+
<execution>
283+
<id>sign-artifacts</id>
284+
<goals>
285+
<goal>sign</goal>
286+
</goals>
287+
</execution>
288+
</executions>
289+
</plugin>
278290
<!-- Docker -->
279291
<plugin>
280292
<groupId>com.spotify</groupId>
@@ -415,6 +427,9 @@
415427
</profile>
416428
<profile>
417429
<id>deploy2Maven</id>
430+
<properties>
431+
<gpg.passphrase>${env.MAVEN_GPG_PASSPHRASE}</gpg.passphrase>
432+
</properties>
418433
<distributionManagement>
419434
<repository>
420435
<id>ossrh</id>
@@ -428,6 +443,9 @@
428443
<groupId>org.sonatype.plugins</groupId>
429444
<artifactId>nexus-staging-maven-plugin</artifactId>
430445
</plugin>
446+
<plugin>
447+
<artifactId>maven-gpg-plugin</artifactId>
448+
</plugin>
431449
</plugins>
432450
</build>
433451
</profile>

0 commit comments

Comments
 (0)