Skip to content

Commit ab6d63c

Browse files
committed
Implement Colilot suggestion
1 parent 532fec4 commit ab6d63c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/release_to_maven.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@ on:
77
description: 'Tag'
88
required: true
99
default: '0.0.0'
10-
sonatypeUsername:
11-
description: 'Sonatype username'
12-
type: string
13-
required: true
14-
sonatypePassword:
15-
description: 'Sonatype password'
16-
type: string
17-
required: true
1810

1911
jobs:
2012
publish:
@@ -32,6 +24,13 @@ jobs:
3224
- name: Setup Gradle
3325
uses: gradle/actions/setup-gradle@v4
3426

27+
- name: Import GPG key
28+
run: |
29+
echo "$GPG_SIGNING_KEY_PW" | gpg --batch --import --yes --passphrase-fd 0 <(echo -n "$GPG_SIGNING_KEY_B64" | base64 --decode)
30+
env:
31+
GPG_SIGNING_KEY_B64: ${{ secrets.$GPG_PRIVATE_KEY_B64 }}
32+
GPG_SIGNING_KEY_PW: ${{ secrets.GPG_PASSPHRASE }}
33+
3534
- name: Setup GPG key information
3635
run: |
3736
mkdir -p ~/.gradle ~/.gnupg
@@ -48,9 +47,10 @@ jobs:
4847
env:
4948
GPG_SIGNING_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
5049
GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
50+
JAVA_HOME: /usr/lib/jvm/java-17-temurin
5151

5252
- name: Publish package
5353
run: ./gradlew publishToSonatype closeSonatypeStagingRepository
5454
env:
55-
SONATYPE_USERNAME: ${{ inputs.sonatypeUsername }}
56-
SONATYPE_PASSWORD: ${{ inputs.sonatypePassword }}
55+
SONATYPE_USERNAME: ${{ secrets.NEXUS_USERNAME }}
56+
SONATYPE_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

0 commit comments

Comments
 (0)