Skip to content

Commit

Permalink
fix github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Oct 17, 2024
1 parent 0540430 commit 489d8b2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# LavaQueue
# LavaQueue

yes, no docs lol.
30 changes: 25 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,44 @@ allprojects {
}

val isMavenDefined = findProperty("MAVEN_USERNAME") != null && findProperty("MAVEN_PASSWORD") != null
val isLavalinkMavenDefined = findProperty("LAVALINK_MAVEN_USERNAME") != null && findProperty("LAVALINK_MAVEN_PASSWORD") != null

subprojects {
apply<MavenPublishPlugin>()

configure<PublishingExtension> {
if (findProperty("MAVEN_PASSWORD") != null && findProperty("MAVEN_USERNAME") != null) {
if (isMavenDefined) {
repositories {
val snapshots = "https://maven.lavalink.dev/snapshots"
val releases = "https://maven.lavalink.dev/releases"
val snapshots = "https://maven.topi.wtf/snapshots"
val releases = "https://maven.topi.wtf/releases"

maven(if (release) releases else snapshots) {
credentials {
password = findProperty("MAVEN_PASSWORD") as String?
username = findProperty("MAVEN_USERNAME") as String?
password = findProperty("MAVEN_PASSWORD") as String?
}
}
}
} else {
logger.lifecycle("Not publishing to maven.lavalink.dev because credentials are not set")
logger.lifecycle("Not publishing to maven.topi.wtf because credentials are not set")
}

if (name == "main") {
if (isLavalinkMavenDefined) {
repositories {
val snapshots = "https://maven.lavalink.dev/snapshots"
val releases = "https://maven.lavalink.dev/releases"

maven(if (release) releases else snapshots) {
credentials {
username = findProperty("LAVALINK_MAVEN_USERNAME") as String?
password = findProperty("LAVALINK_MAVEN_PASSWORD") as String?
}
}
}
} else {
logger.lifecycle("Not publishing to maven.lavalink.dev because credentials are not set")
}
}
}
}
Expand Down

0 comments on commit 489d8b2

Please sign in to comment.