Skip to content

Commit aa0df7f

Browse files
Sign artifacts in build pipeline
1 parent d8c9ad0 commit aa0df7f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
server-username: MAVEN_USERNAME
3333
server-password: MAVEN_PASSWORD
3434
gpg-private-key: ${{ secrets.SONATYPE_GPG_KEY }} # Value of the GPG private key to import
35-
gpg-passphrase: ${{ secrets.SONATYPE_GPG_PASSWORD }}
35+
gpg-passphrase: MAVEN_GPG_PASSPHRASE # Env var name for GPG passphrase
3636

3737
- name: Test and Build
3838
if: ${{ !matrix.sonar-enabled }}
@@ -54,7 +54,7 @@ jobs:
5454
- name: Deploy to Sonatype
5555
if: matrix.deploy-enabled
5656
run: |
57-
./mvnw -B -U -Dstyle.color=always -Prelease deploy -DskipTests=true
57+
./mvnw -B -U -Dstyle.color=always -Prelease -Psign deploy -DskipTests=true
5858
env:
5959
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6060
MAVEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_ID }}

pom.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,10 @@
378378
<goal>sign</goal>
379379
</goals>
380380
<configuration>
381-
<keyname>AA9DC051550F7897</keyname>
382-
<useAgent>true</useAgent>
381+
<gpgArguments>
382+
<arg>--pinentry-mode</arg>
383+
<arg>loopback</arg>
384+
</gpgArguments>
383385
</configuration>
384386
</execution>
385387
</executions>

0 commit comments

Comments
 (0)