File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 uses : actions/cache@v1
2727 with :
2828 path : ~/.m2
29- key : m2
29+ key : m2-cache-${{ matrix.java }}-${{ matrix.arch }}-${{ matrix.os }}
3030
3131 - name : Set up JDK ${{ matrix.java }}
3232 uses : joschi/setup-jdk@2d2c40de6fb6af3db2a3d2bedd57eb02442521c4
3636
3737 - name : Build with Maven
3838 run : mvn verify -B -"Dgpg.skip"
39+
40+ release :
41+ if : github.ref == 'refs/heads/master'
42+ needs : test
43+ runs-on : ubuntu-latest
44+ steps :
45+ - uses : actions/checkout@v1
46+
47+ - name : Cache Maven dependencies
48+ uses : actions/cache@v1
49+ with :
50+ path : ~/.m2
51+ key : m2-cache-8-x64-ubuntu-latest
52+
53+ - name : Set up JDK 8
54+ uses : joschi/setup-jdk@2d2c40de6fb6af3db2a3d2bedd57eb02442521c4
55+ with :
56+ java-version : ' 8'
57+ architecture : ' x64'
58+ server-id : ossrh
59+ server-username : SONATYPE_USER
60+ server-password : SONATYPE_PW
61+
62+ - name : Release to Maven Central
63+ env :
64+ SONATYPE_USER : ${{ secrets.SONATYPE_USER }}
65+ SONATYPE_PW : ${{ secrets.SONATYPE_PW }}
66+ run : |
67+ cat <(echo -e "${{ secrets.GPG_KEY }}") | gpg --batch --import
68+ gpg --list-secret-keys --keyid-format LONG
69+ mvn \
70+ --no-transfer-progress \
71+ --batch-mode \
72+ -Dgpg.passphrase="${{ secrets.GPG_PW }}" \
73+ -DperformRelease=true \
74+ deploy
Original file line number Diff line number Diff line change 6565 </goals >
6666 </execution >
6767 </executions >
68+ <configuration >
69+ <gpgArguments >
70+ <arg >--pinentry-mode</arg >
71+ <arg >loopback</arg >
72+ </gpgArguments >
73+ </configuration >
6874 </plugin >
6975
7076 <plugin >
207213 </execution >
208214 </executions >
209215 </plugin >
216+
217+ <plugin >
218+ <groupId >org.apache.maven.plugins</groupId >
219+ <artifactId >maven-deploy-plugin</artifactId >
220+ <version >2.8.2</version >
221+ </plugin >
222+
223+ <plugin >
224+ <groupId >org.sonatype.plugins</groupId >
225+ <artifactId >nexus-staging-maven-plugin</artifactId >
226+ <version >1.6.8</version >
227+ <extensions >true</extensions >
228+ <configuration >
229+ <serverId >ossrh</serverId >
230+ <nexusUrl >https://oss.sonatype.org/</nexusUrl >
231+ <autoReleaseAfterClose >false</autoReleaseAfterClose >
232+ </configuration >
233+ </plugin >
210234 </plugins >
211235 </build >
212236
You can’t perform that action at this time.
0 commit comments