File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change 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 >
171172 <publishingServerId >central</publishingServerId >
172173 <tokenAuth >true</tokenAuth >
173174 <autoPublish >true</autoPublish >
175+ <skipPublishing >${skipCentralPublishing} </skipPublishing >
174176 </configuration >
175177 </plugin >
176178
You can’t perform that action at this time.
0 commit comments