@@ -26,33 +26,35 @@ jobs:
2626 runs-on : ubuntu-latest
2727
2828 steps :
29- - uses : actions/checkout@v3
30- - name : Set up JDK 11
31- uses : actions/setup-java@v3
32- with :
33- distribution : ' temurin'
34- java-version : 11
35- overwrite-settings : false
36- gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
37- gpg-passphrase : ${{ secrets.GPG_PASSPHRASE }}
38-
39- - name : Cache local Maven repository
40- uses : actions/cache@v3
41- with :
42- path : ~/.m2/repository
43- key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
44- restore-keys : |
45- ${{ runner.os }}-maven
46- - name : Setting up git config
47- run : |
48- git config --global user.name "GitHub"
49- git config --global user.email "noreply@github.com"
50-
51- - name : Build with Maven and Deploy To Maven Central Repository
52- run : mvn -B release:prepare release:perform -s settings.xml --file pom.xml
53- env :
54- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55- SERVER_ID : ossrh
56- MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
57- MAVEN_CENTRAL_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
58- MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
29+ - uses : actions/checkout@v3
30+ - name : Set up JDK 11
31+ uses : actions/setup-java@v3
32+ with :
33+ distribution : ' temurin'
34+ java-version : 11
35+ server-id : ossrh # Value of the distributionManagement/repository/id field of the pom.xml
36+ server-username : MAVEN_USERNAME # env variable for username in deploy
37+ server-password : MAVEN_CENTRAL_TOKEN # env variable for token in deploy
38+ gpg-private-key : ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
39+ gpg-passphrase : MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
40+
41+ - name : Cache local Maven repository
42+ uses : actions/cache@v3
43+ with :
44+ path : ~/.m2/repository
45+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
46+ restore-keys : |
47+ ${{ runner.os }}-maven
48+
49+ - name : Setting up git config
50+ run : |
51+ git config --global user.name "GitHub"
52+ git config --global user.email "noreply@github.com"
53+
54+ - name : Build with Maven and Deploy To Maven Central Repository
55+ run : mvn -B release:prepare release:perform
56+ env :
57+ MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
58+ MAVEN_CENTRAL_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
59+ MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
60+
0 commit comments