Skip to content

Commit 150885b

Browse files
committed
updating gpg signature for java
1 parent e33bc26 commit 150885b

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/java.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,16 @@ jobs:
6565
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
6666
restore-keys: ${{ runner.os }}-m2
6767

68-
- name: Deploy to Central Portal
68+
- name: Deploy SNAPSHOT to Sonatype Snapshots
69+
if: github.ref == 'refs/heads/develop'
70+
run: cd java && mvn clean deploy -DskipCentralPublishing=true
71+
env:
72+
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
73+
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
74+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
75+
76+
- name: Deploy Release to Central Portal
77+
if: startsWith(github.ref, 'refs/tags/v')
6978
run: cd java && mvn clean deploy
7079
env:
7180
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

java/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<maven.compiler.target>21</maven.compiler.target>
6161
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6262
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
63+
<skipCentralPublishing>false</skipCentralPublishing>
6364
</properties>
6465

6566
<dependencies>
@@ -171,6 +172,7 @@
171172
<publishingServerId>central</publishingServerId>
172173
<tokenAuth>true</tokenAuth>
173174
<autoPublish>true</autoPublish>
175+
<skipPublishing>${skipCentralPublishing}</skipPublishing>
174176
</configuration>
175177
</plugin>
176178

0 commit comments

Comments
 (0)