File tree Expand file tree Collapse file tree 2 files changed +45
-7
lines changed
Expand file tree Collapse file tree 2 files changed +45
-7
lines changed Original file line number Diff line number Diff line change 1+ name : Maven Publish
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ build :
9+
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+ packages : write
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+ - name : Set up JDK 11
18+ uses : actions/setup-java@v4
19+ with :
20+ java-version : ' 11'
21+ distribution : ' temurin'
22+ server-id : central
23+ server-username : MAVEN_CENTRAL_USERNAME
24+ server-password : MAVEN_CENTRAL_TOKEN
25+ gpg-private-key : ${{ secrets.GPG_SECRET_KEY }}
26+ gpg-passphrase : GPG_PASSPHRASE
27+
28+ - name : Build and Test
29+ run : mvn clean package -Dmaven.javadoc.skip=false
30+
31+ - name : Publish to Maven Central
32+ env :
33+ GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
34+ MAVEN_CENTRAL_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
35+ MAVEN_CENTRAL_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
36+ run : mvn -X deploy -Dmaven.javadoc.skip=false
Original file line number Diff line number Diff line change 4040 </license >
4141 </licenses >
4242
43- <distributionManagement >
44- <repository >
45- <id >ossrh</id >
46- <url >https://oss.sonatype.org/service/local/staging/deploy/maven2/</url >
47- </repository >
48- </distributionManagement >
49-
5043 <dependencies >
5144 <dependency >
5245 <groupId >com.jayway.jsonpath</groupId >
266259 </execution >
267260 </executions >
268261 </plugin >
262+ <plugin >
263+ <groupId >org.sonatype.central</groupId >
264+ <artifactId >central-publishing-maven-plugin</artifactId >
265+ <version >0.7.0</version >
266+ <extensions >true</extensions >
267+ <configuration >
268+ <publishingServerId >central</publishingServerId >
269+ </configuration >
270+ </plugin >
269271 </plugins >
270272 </build >
271273</project >
You can’t perform that action at this time.
0 commit comments