Skip to content

Commit

Permalink
Automatically publish to SDKman
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfs committed Dec 23, 2021
1 parent 98066e2 commit dce96e0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .teamcity/settings/GradleProfilerPublishToSdkMan.kt
@@ -1,5 +1,7 @@
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.finishBuildTrigger
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.retryBuild

class GradleProfilerPublishToSdkMan(publishingBuild: GradleProfilerPublishing) : BuildType({
name = "Gradle profiler Publish to SDKman"
Expand All @@ -12,6 +14,19 @@ class GradleProfilerPublishToSdkMan(publishingBuild: GradleProfilerPublishing) :
gradleProfilerVcs()
val os = Os.linux

triggers {
finishBuildTrigger {
buildType = publishingBuild.id.toString()
successfulOnly = true
branchFilter = "+:master"
}
retryBuild {
delaySeconds = 30 * 60 // Wait for half an hour for the artifact to appear on Maven Central
attempts = 1
retryWithTheSameRevisions = true
}
}

params {
// Java home must always use Java11
// since intellij-gradle-plugin is not compatible with Java8
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Expand Up @@ -10,5 +10,5 @@ These are the steps to release Gradle profiler.
* Commit the updated version number: _git commit -S -am "Prepare next development version 0.13.0"_
* Push the version update
* Update the [release draft](https://github.com/gradle/gradle-profiler/releases) prepared by [release-drafter](https://probot.github.io/apps/release-drafter/), assign the tag you created and publish the release
* When the release shows up on Maven Central (see the link in the release notes), then publish it to SDKman by promoting [the publishing job](https://builds.gradle.org/buildConfiguration/GradleProfiler_GradleProfilerPublishing?branch=%3Cdefault%3E) to [Publish to SDKman](https://builds.gradle.org/buildConfiguration/GradleProfiler_GradleProfilerPublishToSdkMan?branch=%3Cdefault%3E).
* The [Publish to SDKman](https://builds.gradle.org/buildConfiguration/GradleProfiler_GradleProfilerPublishToSdkMan?branch=%3Cdefault%3E) should trigger automatically after the publishing job finishes. Though it may fail, since the artifacts are not yet on Maven Central. The build will retry the SDKMan publishing after half an hour. If it still doesn't work, you can trigger the build manually.
* All done!

0 comments on commit dce96e0

Please sign in to comment.