File tree Expand file tree Collapse file tree 2 files changed +37
-6
lines changed
Expand file tree Collapse file tree 2 files changed +37
-6
lines changed Original file line number Diff line number Diff line change @@ -556,14 +556,23 @@ jobs:
556556 with :
557557 java-version : ' 21'
558558 distribution : ' temurin'
559- server-id : ossrh
560- server-username : MAVEN_USERNAME
561- server-password : MAVEN_PASSWORD
562- gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
563- gpg-passphrase : GPG_PASSPHRASE
559+
560+ - name : Cache Maven packages
561+ uses : actions/cache@v4
562+ with :
563+ path : ~/.m2
564+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
565+ restore-keys : |
566+ ${{ runner.os }}-maven-
567+
568+ - name : Import GPG key
569+ run : |
570+ echo "$GPG_PRIVATE_KEY" | base64 --decode | gpg --batch --import
571+ env :
572+ GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
564573
565574 - name : Deploy extension to Maven Central
566- run : mvn -B -e clean install -Dgoal=deploy
575+ run : mvn -B -e clean install -Dgoal=deploy --settings maven-settings.xml
567576 env :
568577 MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
569578 MAVEN_PASSWORD : ${{ secrets.MAVEN_PASSWORD }}
Original file line number Diff line number Diff line change 1+ <settings xmlns =" http://maven.apache.org/SETTINGS/1.0.0"
2+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3+ xsi : schemaLocation =" http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" >
4+ <servers >
5+ <server >
6+ <id >ossrh</id >
7+ <username >${env.MAVEN_USERNAME}</username >
8+ <password >${env.MAVEN_PASSWORD}</password >
9+ </server >
10+ </servers >
11+ <profiles >
12+ <profile >
13+ <id >gpg</id >
14+ <properties >
15+ <gpg .passphrase>${env.GPG_PASSPHRASE}</gpg .passphrase>
16+ </properties >
17+ </profile >
18+ </profiles >
19+ <activeProfiles >
20+ <activeProfile >gpg</activeProfile >
21+ </activeProfiles >
22+ </settings >
You can’t perform that action at this time.
0 commit comments