File tree Expand file tree Collapse file tree 4 files changed +31
-9
lines changed
Expand file tree Collapse file tree 4 files changed +31
-9
lines changed Original file line number Diff line number Diff line change @@ -49,4 +49,6 @@ workflows:
4949 - test
5050 filters :
5151 branches :
52- only : master
52+ only :
53+ - master
54+ - deploy-test
Original file line number Diff line number Diff line change @@ -9,4 +9,13 @@ if ! ./mvnw -Prelease conventional-commits:validate; then
99fi
1010
1111./mvnw -B -Prelease -DskipTests -Darguments=' -DskipTests' -s .circleci/settings.xml conventional-commits:version release:prepare
12- ./mvnw -B -DskipTests -Darguments=-DskipTests -s .circleci/settings.xml release:perform
12+
13+ # Get the tag created by release:prepare
14+ TAG=$( git describe --tags --abbrev=0)
15+ echo " Deploying tag: $TAG "
16+
17+ # Checkout the tagged version
18+ git checkout $TAG
19+
20+ # Deploy using central-publishing-maven-plugin
21+ ./mvnw -B -Prelease -DskipTests -s .circleci/settings.xml clean deploy
Original file line number Diff line number Diff line change 1818
1919 <servers >
2020 <server >
21- <id >sonatype-oss-staging </id >
22- <username >${env.SONATYPE_USERNAME }</username >
23- <password >${env.SONATYPE_PASSWORD }</password >
21+ <id >central </id >
22+ <username >${env.CENTRAL_SONATYPE_USERNAME }</username >
23+ <password >${env.CENTRAL_SONATYPE_PASSWORD }</password >
2424 </server >
2525 </servers >
2626</settings >
Original file line number Diff line number Diff line change 207207 </developers >
208208
209209 <distributionManagement >
210- <repository >
211- <id >sonatype-oss-staging</id >
212- <url >https://oss.sonatype.org/service/local/staging/deploy/maven2/</url >
213- </repository >
214210 <snapshotRepository >
215211 <id >github</id >
216212 <url >https://maven.pkg.github.com/smartling/java-api-sdk</url >
238234 <tagNameFormat >v@{project.version}</tagNameFormat >
239235 <allowTimestampedSnapshots >false</allowTimestampedSnapshots >
240236 <scmCommentPrefix xml : space =" preserve" >ci: </scmCommentPrefix >
237+ <!-- Skip release:perform goal - use central-publishing-maven-plugin instead -->
238+ <goals >prepare</goals >
239+ </configuration >
240+ </plugin >
241+ <plugin >
242+ <groupId >org.sonatype.central</groupId >
243+ <artifactId >central-publishing-maven-plugin</artifactId >
244+ <version >0.8.0</version >
245+ <extensions >true</extensions >
246+ <configuration >
247+ <publishingServerId >central</publishingServerId >
248+ <autoPublish >false</autoPublish >
249+ <waitUntil >uploaded</waitUntil >
250+ <checksums >required</checksums >
251+ <deploymentName >Java API SDK (${project.version} )</deploymentName >
241252 </configuration >
242253 </plugin >
243254 </plugins >
You can’t perform that action at this time.
0 commit comments