Skip to content

Commit 45c68c8

Browse files
committed
fix(ci): enable gpg signing only for release
1 parent 9338b41 commit 45c68c8

File tree

2 files changed

+25
-15
lines changed

2 files changed

+25
-15
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
git push origin main
5959
6060
- name: Build and Deploy to Maven Central
61-
run: ./mvnw clean deploy --batch-mode
61+
run: ./mvnw clean deploy -Prelease --batch-mode
6262
env:
6363
MAVEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
6464
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}

pom.xml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,30 @@
7979
<publishingServerId>central</publishingServerId>
8080
</configuration>
8181
</plugin>
82-
<plugin>
83-
<groupId>org.apache.maven.plugins</groupId>
84-
<artifactId>maven-gpg-plugin</artifactId>
85-
<version>3.2.8</version>
86-
<executions>
87-
<execution>
88-
<id>sign-artifacts</id>
89-
<phase>verify</phase>
90-
<goals>
91-
<goal>sign</goal>
92-
</goals>
93-
</execution>
94-
</executions>
95-
</plugin>
9682
</plugins>
9783
</build>
84+
85+
<profiles>
86+
<profile>
87+
<id>release</id>
88+
<build>
89+
<plugins>
90+
<plugin>
91+
<groupId>org.apache.maven.plugins</groupId>
92+
<artifactId>maven-gpg-plugin</artifactId>
93+
<version>3.2.8</version>
94+
<executions>
95+
<execution>
96+
<id>sign-artifacts</id>
97+
<phase>verify</phase>
98+
<goals>
99+
<goal>sign</goal>
100+
</goals>
101+
</execution>
102+
</executions>
103+
</plugin>
104+
</plugins>
105+
</build>
106+
</profile>
107+
</profiles>
98108
</project>

0 commit comments

Comments
 (0)