Skip to content

Commit 491ea18

Browse files
committed
1 parent 8e42a8a commit 491ea18

2 files changed

Lines changed: 28 additions & 22 deletions

File tree

.github/workflows/maven-central.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Install gpg secret key
1919
run: cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
2020
- name: Publish package
21-
run: mvn --batch-mode deploy -DskipTests=true -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
21+
run: mvn --batch-mode deploy -DskipTests=true -DreleaseBuild=true -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
2222
env:
2323
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
2424
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

pom.xml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,6 @@
4141
<sourceDirectory>src</sourceDirectory>
4242
<testSourceDirectory>test</testSourceDirectory>
4343
<plugins>
44-
<plugin>
45-
<groupId>org.apache.maven.plugins</groupId>
46-
<artifactId>maven-gpg-plugin</artifactId>
47-
<version>1.6</version>
48-
<configuration>
49-
<useAgent>true</useAgent>
50-
<gpgArguments>
51-
<arg>--pinentry-mode</arg>
52-
<arg>loopback</arg>
53-
</gpgArguments>
54-
</configuration>
55-
<executions>
56-
<execution>
57-
<id>sign-artifacts</id>
58-
<phase>deploy</phase>
59-
<goals>
60-
<goal>sign</goal>
61-
</goals>
62-
</execution>
63-
</executions>
64-
</plugin>
6544
<plugin>
6645
<groupId>org.apache.maven.plugins</groupId>
6746
<artifactId>maven-javadoc-plugin</artifactId>
@@ -339,5 +318,32 @@
339318
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
340319
</properties>
341320
</profile>
321+
<profile>
322+
<id>release-sign-artifacts</id>
323+
<activation>
324+
<property>
325+
<name>releaseBuild</name>
326+
<value>true</value>
327+
</property>
328+
</activation>
329+
<build>
330+
<plugins>
331+
<plugin>
332+
<groupId>org.apache.maven.plugins</groupId>
333+
<artifactId>maven-gpg-plugin</artifactId>
334+
<version>1.6</version>
335+
<executions>
336+
<execution>
337+
<id>sign-artifacts</id>
338+
<phase>verify</phase>
339+
<goals>
340+
<goal>sign</goal>
341+
</goals>
342+
</execution>
343+
</executions>
344+
</plugin>
345+
</plugins>
346+
</build>
347+
</profile>
342348
</profiles>
343349
</project>

0 commit comments

Comments
 (0)