Skip to content

Commit dd5af99

Browse files
authored
feat: fix pom.xml to fix CI for publishing to https://central.sonatype.com (#35)
* feat: fix pom.xml to fix CI for publishing to https://central.sonatype.com * fix: modify the password in ci and fix the node version
1 parent 3539f5c commit dd5af99

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

.github/workflows/ci.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ jobs:
7373
with:
7474
token: ${{ secrets.CODECOV_TOKEN }}
7575

76+
- name: Set up Node.js
77+
uses: actions/setup-node@v2
78+
with:
79+
node-version: 20
80+
7681
- name: Semantic Release
7782
run: |
7883
npm install -g @conveyal/maven-semantic-release semantic-release
@@ -81,5 +86,5 @@ jobs:
8186
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
8287
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
8388
GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSWORD }}
84-
OSSRH_JIRA_USERNAME: ${{ secrets.OSSRH_USERNAME }}
85-
OSSRH_JIRA_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
89+
OSSRH_JIRA_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }}
90+
OSSRH_JIRA_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }}

pom.xml

+9-12
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<licenses>
3030
<license>
3131
<name>The Apache Software License, Version 2.0</name>
32-
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
32+
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
3333
<distribution>repo</distribution>
3434
</license>
3535
</licenses>
@@ -60,14 +60,11 @@
6060
<distributionManagement>
6161
<snapshotRepository>
6262
<id>ossrh</id>
63-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
63+
<url>https://central.sonatype.com</url>
6464
</snapshotRepository>
65-
<repository>
66-
<id>ossrh</id>
67-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
68-
</repository>
6965
</distributionManagement>
7066

67+
7168
<build>
7269
<plugins>
7370
<plugin>
@@ -181,15 +178,15 @@
181178
</plugin>
182179
<plugin>
183180
<!-- Automatically close and deploy from OSSRH -->
184-
<groupId>org.sonatype.plugins</groupId>
185-
<artifactId>nexus-staging-maven-plugin</artifactId>
186-
<version>1.6.7</version>
181+
<groupId>org.sonatype.central</groupId>
182+
<artifactId>central-publishing-maven-plugin</artifactId>
183+
<version>0.5.0</version>
187184
<extensions>true</extensions>
188185
<configuration>
189-
<serverId>ossrh</serverId>
190-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
186+
<publishingServerId>ossrh</publishingServerId>
187+
<tokenAuth>true</tokenAuth>
191188
<!-- Release versions will be synced to Maven Central automatically. -->
192-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
189+
<autoPublish>true</autoPublish>
193190
</configuration>
194191
</plugin>
195192
</plugins>

0 commit comments

Comments
 (0)