diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 295aba77b..9b824d58a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,13 +112,12 @@ jobs: ./gradlew :mirai-console-compiler-annotations:publish --info -# TEMP DISABLE -# - name: Publish Gradle plugin -# run: > -# ./gradlew -# :mirai-console-gradle:publishPlugins --info --stacktrace -# -Dgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -# -Dgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} + - name: Publish Gradle plugin + run: > + ./gradlew + :mirai-console-gradle:publishPlugins --info --stacktrace + -Dgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} + -Dgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} - name: Gradle :ci-release-helper:closeAndReleaseRepository run: > diff --git a/buildSrc/src/main/kotlin/JvmPublishing.kt b/buildSrc/src/main/kotlin/JvmPublishing.kt index 3a996f364..a7216d82a 100644 --- a/buildSrc/src/main/kotlin/JvmPublishing.kt +++ b/buildSrc/src/main/kotlin/JvmPublishing.kt @@ -22,7 +22,9 @@ import org.gradle.kotlin.dsl.get import org.gradle.kotlin.dsl.register import org.gradle.kotlin.dsl.registering -fun Project.configureRemoteRepos() { +fun Project.configureRemoteRepos( + bintrayPkgName: String = "mirai-core" +) { tasks.register("ensureBintrayAvailable") { doLast { if (!project.isBintrayAvailable()) { @@ -64,7 +66,7 @@ fun Project.configureRemoteRepos() { if (isBintrayAvailable()) { maven { - setUrl("https://api.bintray.com/maven/him188moe/mirai/mirai-core/;publish=1;override=1") + setUrl("https://api.bintray.com/maven/him188moe/mirai/$bintrayPkgName/;publish=1;override=1") credentials { username = Bintray.getUser(project) @@ -86,7 +88,9 @@ inline fun Project.configurePublishing( bintrayPkgName: String = artifactId, vcs: String = "https://github.com/mamoe/mirai" ) { - configureRemoteRepos() + configureRemoteRepos( + bintrayPkgName = bintrayPkgName + ) apply() if (project.isBintrayAvailable()) {