File tree Expand file tree Collapse file tree 2 files changed +19
-28
lines changed Expand file tree Collapse file tree 2 files changed +19
-28
lines changed Original file line number Diff line number Diff line change @@ -13,26 +13,17 @@ jobs:
1313 with :
1414 java-version : ' 11'
1515 distribution : ' temurin'
16- server-id : ossrh
17- server-username : MAVEN_USERNAME
18- server-password : MAVEN_PASSWORD
19- gpg-private-key : ${{ secrets.OSSRH_GPG_SECRET_KEY }}
20- gpg-passphrase : MAVEN_GPG_PASSPHRASE
21- - name : build artifact
22- run : mvn clean package
23- - name : Create release
24- uses : ncipollo/release-action@v1
25- with :
26- allowUpdates : true
27- artifacts : " ${{ github.workspace }}/target/*.jar"
28- token : ${{ secrets.GITHUB_TOKEN }}
29- - name : Publish to the Maven Central Repository
30- run : |
31- mvn \
32- --no-transfer-progress \
33- --batch-mode \
34- deploy
16+ cache : gradle
17+
18+ - name : Grant execute permission for gradlew
19+ run : chmod +x gradlew
20+ - name : Build with Gradle
21+ run : ./gradlew :YChartsLib:clean build publish
22+
3523 env :
36- MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
37- MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
38- MAVEN_GPG_PASSPHRASE : ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
24+ MAVEN_USERNAME : ${{ secrets.MAVENCENTRALUSERNAME }}
25+ MAVEN_PASSWORD : ${{ secrets.MAVENCENTRALPASSWORD}}
26+ MEMORY_KEY : ${{ secrets.SIGNINGINMEMORYKEY}}
27+ SIGNINGKEY : ${{ secrets.SIGNINGKEYID}}
28+ SIGNINGPASSWORD : ${{ secrets.SIGNINGPASSWORD}}
29+ # MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
Original file line number Diff line number Diff line change @@ -83,16 +83,16 @@ publishing {
8383 name = " YCharts"
8484 setUrl(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2" )
8585 credentials {
86- username = project.findProperty(" mavenCentralUsername" ).toString()
87- password = project.findProperty(" mavenCentralPassword" ).toString()
86+ username = project.findProperty(" mavenCentralUsername" )? .toString() ? : System .getenv( " MAVEN_USERNAME " )
87+ password = project.findProperty(" mavenCentralPassword" )? .toString() ? : System .getenv( " MAVEN_PASSWORD " )
8888 }
8989 }
9090 }
9191 publications {
9292 register<MavenPublication >(" release" ) {
9393 groupId = " co.yml"
9494 artifactId = " ycharts"
95- version = " 1.0.0 "
95+ version = " 1.0.1 "
9696 afterEvaluate {
9797 from(components[" release" ])
9898 }
@@ -138,9 +138,9 @@ publishing {
138138
139139signing {
140140 useInMemoryPgpKeys(
141- project.findProperty(" signing.keyId" ).toString(),
142- project.findProperty(" signing.InMemoryKey" ).toString(),
143- project.findProperty(" signing.password" ).toString()
141+ project.findProperty(" signing.keyId" )? .toString() ? : System .getenv( " SIGNINGKEY " ),
142+ project.findProperty(" signing.InMemoryKey" )? .toString() ? : System .getenv( " MEMORY_KEY " ),
143+ project.findProperty(" signing.password" )? .toString() ? : System .getenv( " SIGNINGPASSWORD " )
144144 )
145145 sign(publishing.publications)
146146}
You can’t perform that action at this time.
0 commit comments