Skip to content

Commit

Permalink
Auto release to maven central
Browse files Browse the repository at this point in the history
  • Loading branch information
Karlatemp committed Feb 6, 2021
1 parent 9d8781d commit fb26320
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,8 @@ jobs:
# :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: >
./gradlew
:ci-release-helper:closeAndReleaseRepository --info
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ subprojects {

tasks.register("cleanExceptIntellij") {
group = "build"
allprojects.forEach {
if (it.name != "mirai-console-intellij")
dependsOn(it.tasks.findByName("clean"))
allprojects.forEach { proj ->
if (proj.name != "mirai-console-intellij")
proj.tasks.findByName("clean")?.let { dependsOn(it) }
}
}

Expand Down
22 changes: 22 additions & 0 deletions ci-release-helper/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
import keys.SecretKeys

plugins {
id("io.codearte.nexus-staging") version "0.22.0"
}

description = "Mirai CI Methods for Releasing"

nexusStaging {
packageGroup = rootProject.group.toString()
val keys = SecretKeys.getCache(project).loadKey("sonatype")
username = keys.user
password = keys.password
}
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#
# Copyright 2019-2020 Mamoe Technologies and contributors.
# Copyright 2019-2021 Mamoe Technologies and contributors.
#
# 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
# Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
#
# https://github.com/mamoe/mirai/blob/master/LICENSE
#

# style guide
kotlin.code.style=official
# config
Expand All @@ -17,4 +18,5 @@ org.gradle.vfs.watch=true
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
#kotlin.mpp.enableGranularSourceSetsMetadata=true
systemProp.org.gradle.internal.publish.checksums.insecure=true
systemProp.org.gradle.internal.publish.checksums.insecure=true
gnsp.disableApplyOnlyOnRootProjectEnforcement=true
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ include(":mirai-core")
include(":mirai-core-all")

include(":binary-compatibility-validator")
include(":ci-release-helper")


fun includeConsoleProjects() {
Expand Down

0 comments on commit fb26320

Please sign in to comment.