Skip to content

Commit 9f2018c

Browse files
committed
added gpg, probably still missing something, but need a secret in gh actions to test it out
1 parent 664421b commit 9f2018c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/publish_release_version.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ jobs:
4141
distribution: adopt
4242
java-version: 11
4343
check-latest: true
44+
server-id: ossrh
45+
server-username: ORG_GRADLE_PROJECT_mavenCentralUsername
46+
server-password: ORG_GRADLE_PROJECT_mavenCentralPassword
47+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
48+
gpg-passphrase: ORG_GRADLE_PROJECT_signingInMemoryKeyPassword
4449

4550
- name: Cache Gradle packages
4651
uses: actions/cache@v3
@@ -64,10 +69,12 @@ jobs:
6469
with:
6570
swap-size-gb: 12
6671

72+
6773
- name: Deploy to Maven Central with Gradle
6874
env:
6975
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
7076
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_TOKEN }}
77+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
7178
run: >
7279
./gradlew
7380
-Pspark=${{ matrix.spark }}

build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ allprojects {
5959
// ORG_GRADLE_PROJECT_mavenCentralUsername and
6060
// ORG_GRADLE_PROJECT_mavenCentralPassword.
6161

62+
// also ORG_GRADLE_PROJECT_signingInMemoryKey=exported_ascii_armored_key
63+
// # optional
64+
// ORG_GRADLE_PROJECT_signingInMemoryKeyId=24875D73
65+
// # if key was created with a password
66+
// ORG_GRADLE_PROJECT_signingInMemoryKeyPassword=secret
67+
6268
signAllPublications()
6369
pom {
6470
name.set("Kotlin Spark API")

0 commit comments

Comments
 (0)