Skip to content

Commit

Permalink
Merge pull request #229 from modelix/plugin-publishing
Browse files Browse the repository at this point in the history
fix: publishing of plugins to GitHub packages
  • Loading branch information
slisson authored Dec 6, 2024
2 parents addae93 + 3cdb2ec commit 0db7399
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
28 changes: 15 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,6 @@ subprojects {
}
}
}

val gprUser = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
val gprToken = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
if (gprUser.isNotBlank() && gprToken.isNotBlank()) {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/modelix/modelix.text-editor")
credentials {
username = gprUser
password = gprToken
}
}
}
}
}
}
Expand Down Expand Up @@ -177,7 +164,22 @@ val packageAllPlugins by tasks.registering(Zip::class) {
}
}

// publish all-editor-plugins.zip to GitHub packages to make it appear on the releases page
publishing {
repositories {
val gprUser = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
val gprToken = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
if (gprUser.isNotBlank() && gprToken.isNotBlank()) {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/modelix/modelix.text-editor")
credentials {
username = gprUser
password = gprToken
}
}
}
}
publications {
create<MavenPublication>("maven") {
artifactId = "all-editor-plugins"
Expand Down
3 changes: 3 additions & 0 deletions mps/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ plugins {
alias(libs.plugins.modelix.mps.buildtools)
}

group = "org.modelix.mps.modules"

mpsBuild {
dependsOn(":editor-common-mps:buildPlugin")
dependsOn(":projectional-editor-ssr-mps:buildPlugin")
dependsOn(":react-ssr-mps:buildPlugin")
mpsHome = mpsHomeDir.get().asFile.absolutePath
javaHome = Jvm.current().javaHome
disableParentPublication()

search("../editor-common-mps/build/idea-sandbox/plugins/editor-common-mps")
search("../projectional-editor-ssr-mps/build/idea-sandbox/plugins/projectional-editor-ssr-mps")
Expand Down

0 comments on commit 0db7399

Please sign in to comment.