File tree Expand file tree Collapse file tree 4 files changed +17
-13
lines changed
Expand file tree Collapse file tree 4 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 4040 env :
4141 OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
4242 OSSRH_TOKEN : ${{ secrets.OSSRH_TOKEN }}
43- ORG_GRADLE_PROJECT_signingKeyId : ${{ secrets.SIGNING_KEY_ID }}
44- ORG_GRADLE_PROJECT_signingKey : ${{ secrets.OSSRH_GPG_KEY }}
43+ SIGNING_KEY : ${{ secrets.SIGNING_KEY }}
44+ SIGNING_PASSWORD : ${{ secrets.SIGNING_PASSWORD }}
4545 working-directory : ./src/AndroidClient
4646 run : ./gradlew android:publishAllPublicationsToOSSRHRepository
Original file line number Diff line number Diff line change 4040 env :
4141 OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
4242 OSSRH_TOKEN : ${{ secrets.OSSRH_TOKEN }}
43- ORG_GRADLE_PROJECT_signingKeyId : ${{ secrets.SIGNING_KEY_ID }}
44- ORG_GRADLE_PROJECT_signingKey : ${{ secrets.OSSRH_GPG_KEY }}
43+ SIGNING_KEY : ${{ secrets.SIGNING_KEY }}
44+ SIGNING_PASSWORD : ${{ secrets.SIGNING_PASSWORD }}
4545 working-directory : ./src/AndroidClient
4646 run : ./gradlew client:publishAllPublicationsToOSSRHRepository
Original file line number Diff line number Diff line change @@ -116,14 +116,15 @@ publishing {
116116 }
117117}
118118
119+ // Check if the environment variables are set
120+ def signingKey = System . getenv(' SIGNING_KEY' )
121+ def signingPassword = System . getenv(' SIGNING_PASSWORD' )
119122
120-
121- if (findProperty( ' signingKeyId ' ) ) {
123+ // Conditionally apply the signing plugin and configuration
124+ if (signingKey && signingPassword ) {
122125 println " Signing enabled"
123126 signing {
124- def signingKeyId = findProperty(" signingKeyId" )
125- def signingKey = findProperty(" signingKey" )
126- useInMemoryPgpKeys(signingKeyId, signingKey, null )
127+ useInMemoryPgpKeys(signingKey, signingPassword)
127128 sign publishing. publications. mavenJava
128129 }
129130} else {
Original file line number Diff line number Diff line change @@ -104,12 +104,15 @@ publishing {
104104 }
105105}
106106
107- if (findProperty(' signingKeyId' )) {
107+ // Check if the environment variables are set
108+ def signingKey = System . getenv(' SIGNING_KEY' )
109+ def signingPassword = System . getenv(' SIGNING_PASSWORD' )
110+
111+ // Conditionally apply the signing plugin and configuration
112+ if (signingKey && signingPassword) {
108113 println " Signing enabled"
109114 signing {
110- def signingKeyId = findProperty(" signingKeyId" )
111- def signingKey = findProperty(" signingKey" )
112- useInMemoryPgpKeys(signingKeyId, signingKey, null )
115+ useInMemoryPgpKeys(signingKey, signingPassword)
113116 sign publishing. publications. mavenJava
114117 }
115118} else {
You can’t perform that action at this time.
0 commit comments