File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Maven Build
2
+
3
+ on :
4
+ push :
5
+ branches : [ "master" ]
6
+ pull_request :
7
+ branches : [ "master" ]
8
+
9
+ jobs :
10
+ build :
11
+
12
+ runs-on : ubuntu-latest
13
+ permissions :
14
+ contents : read
15
+ packages : write
16
+
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ - name : Set up JDK
20
+ uses : actions/setup-java@v4
21
+ with :
22
+ java-version : ' 17'
23
+ distribution : ' temurin'
24
+ cache : maven
25
+
26
+ - name : Build with Maven
27
+ run : mvn -B package --file pom.xml
Original file line number Diff line number Diff line change
1
+ name : Maven Publish
2
+
3
+ on :
4
+ release :
5
+ types : [created]
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
18
+ uses : actions/setup-java@v4
19
+ with :
20
+ java-version : ' 17'
21
+ distribution : ' temurin'
22
+ cache : maven
23
+ server-id : central
24
+ server-username : CENTRAL_USERNAME
25
+ server-password : CENTRAL_PASSWORD
26
+ gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
27
+
28
+ - name : Build with Maven
29
+ run : mvn -B package --file pom.xml
30
+
31
+ - name : Publish to Maven Central
32
+ run : mvn deploy
33
+ env :
34
+ CENTRAL_USERNAME : ${{ secrets.CENTRAL_USERNAME }}
35
+ CENTRAL_PASSWORD : ${{ secrets.CENTRAL_TOKEN }}
36
+ GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
You can’t perform that action at this time.
0 commit comments