Skip to content

Commit a2df3ce

Browse files
authored
fix: use in-memory PGP signing instead of writing key to tmp file (#318)
1 parent f25b651 commit a2df3ce

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

gradle/promote.gradle

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,7 @@ if (!hasProperty("signing.keyId")) {
99

1010
def pgpKeyContent = System.getenv('SIGNING_PRIVATE_KEY_BASE64')
1111
if (pgpKeyContent != null) {
12-
def tmpDir = new File("$rootProject.rootDir/tmp")
13-
mkdir tmpDir
14-
def keyFile = new File("$tmpDir/key.pgp")
15-
keyFile.createNewFile()
16-
def os = keyFile.newDataOutputStream()
17-
os.write(pgpKeyContent.decodeBase64())
18-
os.close()
19-
20-
ext['signing.secretKeyRingFile'] = keyFile.absolutePath
12+
ext['signing.key'] = new String(pgpKeyContent.decodeBase64())
2113
}
2214
}
2315

0 commit comments

Comments
 (0)