Only publish to specified repos

This commit is contained in:
William committed 2023-05-07 22:35:43 +01:00
1 parent e60964ac24
commit b9ecc20480
1 file changed
+4
+4
View File
@@ -108,6 +108,7 @@ subprojects {
publishing { publishing {
repositories { repositories {
if (System.getenv("RELEASES_MAVEN_USERNAME") != null) {
maven { maven {
name = "william278-releases" name = "william278-releases"
url = "https://repo.william278.net/releases" url = "https://repo.william278.net/releases"
@@ -119,6 +120,8 @@ subprojects {
basic(BasicAuthentication) basic(BasicAuthentication)
} }
} }
}
if (System.getenv("SNAPSHOTS_MAVEN_USERNAME") != null) {
maven { maven {
name = "william278-snapshots" name = "william278-snapshots"
url = "https://repo.william278.net/snapshots" url = "https://repo.william278.net/snapshots"
@@ -131,6 +134,7 @@ subprojects {
} }
} }
} }
}
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {