File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ name: Java CI with Maven
66on :
77 push :
88 branches : [master]
9+ tags : ["**"]
910 pull_request :
1011 branches : [master]
1112
2627 distribution : " adopt"
2728 - name : Build with Maven
2829 run : mvn test -B
30+ - name : Import signing key
31+ if : ${{ github.ref_type == 'tag' }}
32+ env :
33+ ARTIFACT_SIGNING_PRIVATE_KEY : ${{ secrets.ARTIFACT_SIGNING_PRIVATE_KEY }}
34+ run : echo "$ARTIFACT_SIGNING_PRIVATE_KEY" | gpg --import
35+ - name : Release to Maven Central
36+ if : ${{ github.ref_type == 'tag' }}
37+ env :
38+ SONATYPE_NEXUS_USERNAME : ${{ secrets.SONATYPE_NEXUS_USERNAME }}
39+ SONATYPE_NEXUS_PASSWORD : ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
40+ run : mvn --activate-profiles release deploy --batch-mode --settings .maven_settings.xml
2941
3042 labeler :
3143 needs : build
Original file line number Diff line number Diff line change 1+ <settings xmlns =" http://maven.apache.org/SETTINGS/1.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
2+ xsi : schemaLocation =" http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd" >
3+ <servers >
4+ <server >
5+ <id >ossrh</id >
6+ <username >${env.SONATYPE_NEXUS_USERNAME}</username >
7+ <password >${env.SONATYPE_NEXUS_PASSWORD}</password >
8+ </server >
9+ </servers >
10+ </settings >
You can’t perform that action at this time.
0 commit comments