Skip to content

Commit 08c4f84

Browse files
committed
chore: Fix GPG setup
1 parent f575d83 commit 08c4f84

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,22 @@ jobs:
6868
"password": "${{ secrets.GITHUB_TOKEN }}"
6969
}]
7070
71+
- id: install-secret-key
72+
name: Install gpg secret key
73+
run: |
74+
# Install gpg secret key
75+
cat <(echo -e "${{ secrets.OSS_SONATYPE_GPG_PRIVATE_KEY }}") | gpg --batch --import
76+
# Verify gpg secret key
77+
gpg --list-secret-keys --keyid-format LONG
78+
7179
- name: Create release
7280
env:
7381
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
7482
MAVEN_GPG_KEY: ${{ secrets.OSS_SONATYPE_GPG_PRIVATE_KEY }}
7583
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSS_SONATYPE_GPG_PASSPHRASE }}
7684
run: |
7785
export TZ="Europe/Berlin"
78-
./mvnw -Prelease release:prepare release:perform -B -DreleaseVersion=${{ inputs.releaseversion }} -Dgpg.signer=bc -DskipITs=true -Darguments="-DskipTests=true -DskipITs=true -Dgpg.signer=bc"
86+
./mvnw release:prepare release:perform -B -Pcentral-publish -DreleaseVersion=${{ inputs.releaseversion }} -Dgpg.passphrase=${{ secrets.OSS_SONATYPE_GPG_PASSPHRASE }} -DskipITs=true -Darguments="-DskipTests=true -DskipITs=true -Dgpg.passphrase=${{ secrets.OSS_SONATYPE_GPG_PASSPHRASE }}"
7987
# write version info
8088
cat <<EOF >target/config.json
8189
{

pom.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@
336336

337337
<profiles>
338338
<profile>
339-
<id>release</id>
339+
<id>central-publish</id>
340340
<build>
341341
<plugins>
342342
<plugin>
@@ -377,7 +377,10 @@
377377
<goal>sign</goal>
378378
</goals>
379379
<configuration>
380-
<signer>bc</signer>
380+
<gpgArguments>
381+
<arg>--pinentry-mode</arg>
382+
<arg>loopback</arg>
383+
</gpgArguments>
381384
</configuration>
382385
</execution>
383386
</executions>

0 commit comments

Comments
 (0)