Skip to content

Commit c88b65f

Browse files
authored
feat: gpg please reback (#48)
* Revert "chore: use token to publishing (#46)" This reverts commit 115a259. * Revert "chore: remove gpg plugin (#47)" This reverts commit 22a47a2.
1 parent 22a47a2 commit c88b65f

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/mvn_publish.yml

+3
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

+21
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090

9191
<!-- plugins -->
9292
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
93+
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
9394
<maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
9495
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
9596
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
@@ -274,6 +275,26 @@
274275
<autoReleaseAfterClose>true</autoReleaseAfterClose>
275276
</configuration>
276277
</plugin>
278+
<plugin>
279+
<groupId>org.apache.maven.plugins</groupId>
280+
<artifactId>maven-gpg-plugin</artifactId>
281+
<version>${maven-gpg-plugin.version}</version>
282+
<executions>
283+
<execution>
284+
<id>sign-artifacts</id>
285+
<goals>
286+
<goal>sign</goal>
287+
</goals>
288+
<phase>verify</phase>
289+
<configuration>
290+
<gpgArguments>
291+
<arg>--pinentry-mode</arg>
292+
<arg>loopback</arg>
293+
</gpgArguments>
294+
</configuration>
295+
</execution>
296+
</executions>
297+
</plugin>
277298
<plugin>
278299
<groupId>org.apache.maven.plugins</groupId>
279300
<artifactId>maven-source-plugin</artifactId>

0 commit comments

Comments
 (0)