Skip to content

Commit a1acde3

Browse files
jakubmalekJakub Malek
authored andcommitted
Sonatype publishing configuration
1 parent df231af commit a1acde3

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ jobs:
2727
- name: Release
2828
run: ./gradlew --info -Prelease.useLastTag=true final
2929
env:
30-
NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }}
31-
NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }}
32-
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
33-
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
34-
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_USERNAME }}
35-
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_OSS_PASSWORD }}
30+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
31+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
32+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
33+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
34+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}

build.gradle.kts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ plugins {
99
id("nebula.contacts") version "6.0.0"
1010
id("nebula.info-scm") version "11.3.3"
1111
id("tylerthrailkill.nebula-mit-license") version "0.0.3"
12+
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
1213

1314
jacoco
1415
`java-library`
1516
`maven-publish`
1617
`project-report`
18+
signing
1719
}
1820

1921
java {
@@ -25,6 +27,24 @@ repositories {
2527
mavenCentral()
2628
}
2729

30+
nexusPublishing {
31+
repositories {
32+
sonatype {
33+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
34+
username.set(System.getenv("SONATYPE_USERNAME"))
35+
password.set(System.getenv("SONATYPE_PASSWORD"))
36+
}
37+
}
38+
}
39+
40+
signing {
41+
useInMemoryPgpKeys(
42+
System.getenv("SIGNING_KEY_ID"),
43+
System.getenv("SIGNING_KEY"),
44+
System.getenv("SIGNING_KEY_PASSWORD"))
45+
sign(publishing.publications["nebula"])
46+
}
47+
2848
contacts {
2949
addPerson("[email protected]", delegateClosureOf<Contact> {
3050
github = "jakubmalek"

0 commit comments

Comments
 (0)