File tree Expand file tree Collapse file tree 4 files changed +34
-0
lines changed
Expand file tree Collapse file tree 4 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1717 java-version : ' 11'
1818 distribution : ' adopt'
1919
20+ - name : Import GPG key
21+ run : |
22+ echo "${{ secrets.OSSRH_GPG }}" > private-key.asc
23+ gpg --import --batch private-key.asc
24+
2025 - name : Cache Gradle packages
2126 uses : actions/cache@v2
2227 with :
3540 env :
3641 OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
3742 OSSRH_TOKEN : ${{ secrets.OSSRH_TOKEN }}
43+ SIGNING_KEY_ID : ${{ secrets.SIGNING_KEY_ID }}
3844 working-directory : ./src/AndroidClient
3945 run : ./gradlew android:publishAllPublicationsToOSSRHRepository
Original file line number Diff line number Diff line change 1717 java-version : ' 11'
1818 distribution : ' adopt'
1919
20+ - name : Import GPG key
21+ run : |
22+ echo "${{ secrets.OSSRH_GPG }}" > private-key.asc
23+ gpg --import --batch private-key.asc
24+
2025 - name : Cache Gradle packages
2126 uses : actions/cache@v2
2227 with :
3540 env :
3641 OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
3742 OSSRH_TOKEN : ${{ secrets.OSSRH_TOKEN }}
43+ SIGNING_KEY_ID : ${{ secrets.SIGNING_KEY_ID }}
3844 working-directory : ./src/AndroidClient
3945 run : ./gradlew client:publishAllPublicationsToOSSRHRepository
Original file line number Diff line number Diff line change @@ -10,6 +10,16 @@ if (project.hasProperty('versionSuffix')) {
1010 version = " ${ version} -${ versionSuffix} "
1111}
1212
13+ if (project. hasProperty(' signing.keyId' ) || System . getenv(" SIGNING_KEY_ID" )) {
14+ println " Signing enabled"
15+ signing {
16+ sign configurations. archives
17+ keyId = project. findProperty(" signing.keyId" ) ?: System . getenv(" SIGNING_KEY_ID" )
18+ }
19+ } else {
20+ println " Signing disabled"
21+ }
22+
1323// Specify dependencies
1424dependencies {
1525 implementation ' com.google.code.gson:gson:2.8.9'
Original file line number Diff line number Diff line change @@ -10,6 +10,18 @@ if (project.hasProperty('versionSuffix')) {
1010 version = " ${ version} -${ versionSuffix} "
1111}
1212
13+ apply plugin : ' signing'
14+
15+
16+ if (project. hasProperty(' signing.keyId' ) || System . getenv(" SIGNING_KEY_ID" )) {
17+ println " Signing enabled"
18+ signing {
19+ sign configurations. archives
20+ keyId = project. findProperty(" signing.keyId" ) ?: System . getenv(" SIGNING_KEY_ID" )
21+ }
22+ } else {
23+ println " Signing disabled"
24+ }
1325
1426// Specify dependencies
1527dependencies {
You can’t perform that action at this time.
0 commit comments