File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,24 @@ jobs:
26
26
with :
27
27
java-version : 17
28
28
29
+ - name : Import GPG key
30
+ id : import_gpg
31
+ uses : crazy-max/ghaction-import-gpg@e37acbdf6e46d8be3f11008297e2964d5f68adef
32
+ with :
33
+ gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
34
+ passphrase : ${{ secrets.GPG_PASSPHRASE }}
35
+ - name : List keys
36
+ run : gpg -K
37
+
29
38
- name : Install packages
30
39
run : gradle wrapper
31
40
- name : Validate Gradle wrapper
32
41
uses : gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
33
42
34
43
- name : Run build and test
35
44
run : ./gradlew build --info
45
+ env :
46
+ GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
36
47
37
48
- name : Create Github Release and Tag
38
49
if : github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name == 'push'
44
55
if : github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name == 'push'
45
56
run : gradle publish
46
57
env :
58
+ GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
47
59
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48
60
MAVEN_OSSRH_TOKEN : ${{ secrets.MAVEN_OSSRH_TOKEN }}
Original file line number Diff line number Diff line change @@ -97,6 +97,6 @@ publishing {
97
97
}
98
98
99
99
signing {
100
- useInMemoryPgpKeys(System .getenv(" GPG_PRIVATE_KEY" ), System .getenv( " GPG_PASSPHRASE " ) )
100
+ useInMemoryPgpKeys(System .getenv(" GPG_PRIVATE_KEY" ), " " )
101
101
sign(publishing.publications[" mavenJava" ])
102
102
}
You can’t perform that action at this time.
0 commit comments