Skip to content

Commit 19d3de3

Browse files
authored
chore(ci): Migrate publishing to Maven Central (#1860)
* Add Maven Central as release target. * Update workflow secrets and SNAPSHOT server id.
1 parent c69b22c commit 19d3de3

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,14 @@ jobs:
202202
cache: maven
203203
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
204204
gpg-passphrase: GPG_PASSPHRASE
205-
server-id: ossrh
205+
server-id: central
206206
server-username: MAVEN_USERNAME
207207
server-password: MAVEN_PASSWORD
208208
- name: Publish package
209209
run: mvn -Prelease clean deploy -DskipTests
210210
env:
211-
MAVEN_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }}
212-
MAVEN_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }}
211+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
212+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
213213
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
214214

215215
create_pr:
@@ -290,4 +290,4 @@ jobs:
290290
run: |
291291
aws s3 sync \
292292
dist \
293-
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/
293+
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/

pom.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@
100100

101101
<distributionManagement>
102102
<snapshotRepository>
103-
<id>ossrh</id>
104-
<url>https://aws.oss.sonatype.org/content/repositories/snapshots</url>
103+
<id>central</id>
104+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
105105
</snapshotRepository>
106106
</distributionManagement>
107107

@@ -439,13 +439,12 @@
439439
</executions>
440440
</plugin>
441441
<plugin>
442-
<groupId>org.sonatype.plugins</groupId>
443-
<artifactId>nexus-staging-maven-plugin</artifactId>
442+
<groupId>org.sonatype.central</groupId>
443+
<artifactId>central-publishing-maven-plugin</artifactId>
444+
<version>0.7.0</version>
444445
<extensions>true</extensions>
445446
<configuration>
446-
<serverId>ossrh</serverId>
447-
<nexusUrl>https://aws.oss.sonatype.org</nexusUrl>
448-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
447+
<publishingServerId>central</publishingServerId>
449448
</configuration>
450449
</plugin>
451450
</plugins>

0 commit comments

Comments
 (0)