File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 java-version : ${{ matrix.java }}
2222 distribution : ${{ matrix.distribution }}
2323 cache : maven
24+ gpg-private-key : ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
25+ gpg-passphrase : MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
2426 - name : Build with Maven
25- run : mvn --batch-mode --update-snapshots verify
27+ run : mvn --batch-mode --update-snapshots verify -Psign
28+ env :
29+ MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
2630 - name : Publish Test Report
2731 uses : mikepenz/action-junit-report@v5
2832 if : ${{ matrix.java == 8 && (success() || failure()) }} # always run even if the previous step fails
Original file line number Diff line number Diff line change 2525 server-id : ossrh
2626 server-username : MAVEN_USERNAME
2727 server-password : MAVEN_PASSWORD
28+ gpg-private-key : ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
29+ gpg-passphrase : MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
2830
2931 - name : Publish package
30- run : mvn --batch-mode deploy
32+ run : mvn --batch-mode deploy -Psign
3133 env :
3234 MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
3335 MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
36+ MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change 7373 </plugins >
7474 </build >
7575
76+ <profiles >
77+ <profile >
78+ <id >sign</id >
79+ <build >
80+ <plugins >
81+ <plugin >
82+ <groupId >org.apache.maven.plugins</groupId >
83+ <artifactId >maven-gpg-plugin</artifactId >
84+ <version >3.2.7</version >
85+ <executions >
86+ <execution >
87+ <id >sign-artifacts</id >
88+ <phase >verify</phase >
89+ <goals >
90+ <goal >sign</goal >
91+ </goals >
92+ </execution >
93+ </executions >
94+ <configuration >
95+ <gpgArguments >
96+ <arg >--pinentry-mode</arg >
97+ <arg >loopback</arg >
98+ </gpgArguments >
99+ </configuration >
100+ </plugin >
101+ </plugins >
102+ </build >
103+ </profile >
104+ </profiles >
105+
76106 <dependencies >
77107 <dependency >
78108 <groupId >junit</groupId >
You can’t perform that action at this time.
0 commit comments