Skip to content

Commit e34f69d

Browse files
committedFeb 21, 2020
ci: add nexus-staging plugin
1 parent f4e895f commit e34f69d

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed
 

‎.github/workflows/publish-release.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,6 @@ jobs:
5656
export GPG_TTY=$(tty) && echo ${GPG_KEY_BASE64} | base64 --decode | gpg --fast-import --batch
5757
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
5858
echo "New version: ${NEW_VERSION}"
59-
./gradlew -Pversion=${NEW_VERSION} publish -i
59+
./gradlew -Pversion=${NEW_VERSION} publish --info
60+
./gradlew getStagingProfile closeAndReleaseRepository --info
6061

‎build.gradle.kts

+11-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ plugins {
1919
id("com.github.johnrengelman.shadow") version "5.2.0"
2020
id("net.researchgate.release") version "2.8.1"
2121
id("io.codearte.nexus-staging") version "0.21.2"
22+
id("de.marcphilipp.nexus-publish") version "0.3.0"
2223
`java-library`
2324
`maven-publish`
2425
signing
@@ -63,6 +64,12 @@ nexusStaging {
6364
packageGroup = "no.nav"
6465
}
6566

67+
nexusPublishing {
68+
repositories {
69+
sonatype()
70+
}
71+
}
72+
6673
publishing {
6774
publications {
6875
create<MavenPublication>("mavenJava") {
@@ -111,6 +118,7 @@ publishing {
111118
password = System.getenv("GITHUB_TOKEN")
112119
}
113120
}
121+
/*
114122
maven {
115123
name = "Sonatype"
116124
val releasesRepoUrl = uri("$mavenRepoBaseUrl/service/local/staging/deploy/maven2/")
@@ -120,7 +128,7 @@ publishing {
120128
username = System.getenv("SONATYPE_USERNAME")
121129
password = System.getenv("SONATYPE_PASSWORD")
122130
}
123-
}
131+
}*/
124132
}
125133
}
126134

@@ -190,7 +198,7 @@ tasks {
190198
}
191199
}
192200

193-
withType<PublishToMavenRepository> {
201+
/*withType<PublishToMavenRepository> {
194202
finalizedBy("closeAndReleaseRepository")
195-
}
203+
}*/
196204
}

0 commit comments

Comments
 (0)
Please sign in to comment.