File tree Expand file tree Collapse file tree 3 files changed +54
-8
lines changed Expand file tree Collapse file tree 3 files changed +54
-8
lines changed Original file line number Diff line number Diff line change @@ -9,4 +9,13 @@ if ! ./mvnw -Prelease conventional-commits:validate; then
9
9
fi
10
10
11
11
./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 18
18
19
19
<servers >
20
20
<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 >
24
24
</server >
25
25
</servers >
26
26
</settings >
Original file line number Diff line number Diff line change 207
207
</developers >
208
208
209
209
<distributionManagement >
210
- <repository >
211
- <id >sonatype-oss-staging</id >
212
- <url >https://oss.sonatype.org/service/local/staging/deploy/maven2/</url >
213
- </repository >
214
210
<snapshotRepository >
215
211
<id >github</id >
216
212
<url >https://maven.pkg.github.com/smartling/java-api-sdk</url >
238
234
<tagNameFormat >v@{project.version}</tagNameFormat >
239
235
<allowTimestampedSnapshots >false</allowTimestampedSnapshots >
240
236
<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.apache.maven.plugins</groupId >
243
+ <artifactId >maven-source-plugin</artifactId >
244
+ <version >3.2.1</version >
245
+ <executions >
246
+ <execution >
247
+ <id >attach-sources</id >
248
+ <goals >
249
+ <goal >jar-no-fork</goal >
250
+ </goals >
251
+ </execution >
252
+ </executions >
253
+ </plugin >
254
+ <plugin >
255
+ <groupId >org.apache.maven.plugins</groupId >
256
+ <artifactId >maven-javadoc-plugin</artifactId >
257
+ <version >3.1.1</version >
258
+ <executions >
259
+ <execution >
260
+ <id >attach-javadocs</id >
261
+ <goals >
262
+ <goal >jar</goal >
263
+ </goals >
264
+ </execution >
265
+ </executions >
266
+ </plugin >
267
+ <plugin >
268
+ <groupId >org.sonatype.central</groupId >
269
+ <artifactId >central-publishing-maven-plugin</artifactId >
270
+ <version >0.8.0</version >
271
+ <extensions >true</extensions >
272
+ <configuration >
273
+ <publishingServerId >central</publishingServerId >
274
+ <autoPublish >false</autoPublish >
275
+ <waitUntil >uploaded</waitUntil >
276
+ <checksums >required</checksums >
277
+ <deploymentName >Java API SDK (${project.version} )</deploymentName >
241
278
</configuration >
242
279
</plugin >
243
280
</plugins >
You can’t perform that action at this time.
0 commit comments