Skip to content

Commit f6b6322

Browse files
adding gpg import step
1 parent 0ef6c17 commit f6b6322

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,15 @@ jobs:
3030
gpg-private-key: ${{ env.MAVEN_GPG_PRIVATE_KEY }}
3131
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3232

33+
- name: Import GPG key
34+
run: |
35+
echo "${{ secrets.MAVEN_GPG_PRIVATE_KEY }}" > private.key
36+
gpg --batch --import private.key
37+
echo 'pinentry-mode loopback' >> ~/.gnupg/gpg.conf
38+
rm -f private.key
39+
3340
- name: Build
3441
run: mvn -B package --file auto-generated-sdk/pom.xml
3542

3643
- name: Publish to Apache Maven Central
37-
run: cd auto-generated-sdk && mvn -Psign-artifacts verify deploy
44+
run: cd auto-generated-sdk && mvn -Psign-artifacts verify deploy -Dgpg.passphrase="${{ secrets.MAVEN_GPG_PASSPHRASE }}"

auto-generated-sdk/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,15 @@
219219
<plugin>
220220
<groupId>org.apache.maven.plugins</groupId>
221221
<artifactId>maven-gpg-plugin</artifactId>
222-
<version>1.6</version>
222+
<version>3.2.8</version>
223223
<executions>
224224
<execution>
225225
<id>sign-artifacts</id>
226226
<phase>verify</phase>
227227
<goals>
228228
<goal>sign</goal>
229229
</goals>
230-
<configuration>
230+
<configuration>
231231
<!-- Prevent gpg from using pinentry programs -->
232232
<gpgArguments>
233233
<arg>--pinentry-mode</arg>

0 commit comments

Comments
 (0)