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 40
40
</license >
41
41
</licenses >
42
42
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
-
50
43
<dependencies >
51
44
<dependency >
52
45
<groupId >com.jayway.jsonpath</groupId >
266
259
</execution >
267
260
</executions >
268
261
</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 >
269
271
</plugins >
270
272
</build >
271
273
</project >
You can’t perform that action at this time.
0 commit comments