Skip to content

Commit 0e41e8a

Browse files
committed
gpg signing
1 parent c929b38 commit 0e41e8a

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ jobs:
2020
with:
2121
arguments: publish
2222
env:
23+
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
24+
GPG_SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }}
2325
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
2426
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

build.gradle

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ publishing {
7878
id = "laktak"
7979
name = "Christian Zangl"
8080
}
81+
developer {
82+
id = "trobro"
83+
name = "Fredrik Trobro"
84+
}
8185
}
8286
scm {
8387
connection = "scm:git@github.com:hjson/hjson-java.git"
@@ -99,6 +103,9 @@ publishing {
99103
}
100104
}
101105

102-
// signing {
103-
// sign publishing.publications.maven
104-
// }
106+
signing {
107+
def signingKey = System.getenv("GPG_SIGNING_KEY")
108+
def signingPassword = System.getenv("GPG_SIGNING_PASSWORD")
109+
useInMemoryPgpKeys(signingKey, signingPassword)
110+
sign publishing.publications.maven
111+
}

0 commit comments

Comments
 (0)