File tree Expand file tree Collapse file tree 3 files changed +14
-29
lines changed Expand file tree Collapse file tree 3 files changed +14
-29
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,15 @@ jobs:
3434 - uses : actions/checkout@v4
3535
3636 - name : Setup Java
37- uses : actions/setup-java@v1.4.4
37+ uses : actions/setup-java@v4
3838 with :
39+ distribution : temurin
3940 java-version : 11
40- server-id : ossrh
41- server-username : MAVEN_USERNAME
42- server-password : MAVEN_PASSWORD
41+ server-id : central
42+ server-username : ${{ secrets.OSSRH_USER_TOKEN }}
43+ server-password : ${{ secrets.OSSRH_PWD_TOKEN }}
4344 gpg-private-key : ${{ secrets.GPG_SIGNING_KEY }}
44- gpg-passphrase : MAVEN_GPG_PASSPHRASE
45+ gpg-passphrase : ${{ secrets.GPG_PWD }}
4546
4647 - name : Package
4748 run : |
5152 if : github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
5253 run : |
5354 mvn --no-transfer-progress --batch-mode deploy
54- env :
55- MAVEN_USERNAME : ${{ secrets.OSSRH_USER_TOKEN }}
56- MAVEN_PASSWORD : ${{ secrets.OSSRH_PWD_TOKEN }}
57- MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_PWD }}
5855
5956 - name : Cache Jars
6057 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change 4343 <exec .mainClass>com.scanoss.cli.CommandLine</exec .mainClass>
4444 </properties >
4545
46- <distributionManagement >
47- <snapshotRepository >
48- <id >ossrh</id >
49- <name >Maven Central Snapshot Repo</name >
50- <url >https://oss.sonatype.org/content/repositories/snapshots</url >
51- </snapshotRepository >
52- <repository >
53- <id >ossrh</id >
54- <name >Maven Central Staging Repo</name >
55- <url >https://oss.sonatype.org/service/local/staging/deploy/maven2/</url >
56- </repository >
57- </distributionManagement >
58-
5946 <dependencies >
6047 <!-- Core compile dependencies -->
6148 <dependency >
248235 <goal >sign</goal >
249236 </goals >
250237 <configuration >
238+ <passphraseServerId >gpg.passphrase</passphraseServerId >
251239 <!-- Prevent gpg from using pinentry programs -->
252240 <gpgArguments >
253241 <arg >--pinentry-mode</arg >
258246 </executions >
259247 </plugin >
260248 <plugin >
261- <groupId >org.sonatype.plugins </groupId >
262- <artifactId >nexus-staging -maven-plugin</artifactId >
263- <version >1.6.7 </version >
249+ <groupId >org.sonatype.central </groupId >
250+ <artifactId >central-publishing -maven-plugin</artifactId >
251+ <version >0.9.0 </version >
264252 <extensions >true</extensions >
265253 <configuration >
266- <serverId >ossrh</ serverId >
267- <nexusUrl >https://oss.sonatype.org/</ nexusUrl >
268- <autoReleaseAfterClose >true</ autoReleaseAfterClose >
254+ <publishingServerId >central</ publishingServerId >
255+ <autoPublish >true</ autoPublish >
256+ <waitUntil >published</ waitUntil >
269257 </configuration >
270258 </plugin >
271259 </plugins >
Original file line number Diff line number Diff line change 11<settings >
22 <servers >
33 <server >
4- <id >ossrh </id >
4+ <id >central </id >
55 <username >${env.OSSRH_USER_TOKEN}</username >
66 <password >${env.OSSRH_PWD_TOKEN}</password >
77 </server >
You can’t perform that action at this time.
0 commit comments