Skip to content

Commit 4dc1c14

Browse files
committed
Refinement to release workflow
1 parent 419ed19 commit 4dc1c14

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: publish-candidate
3838
if: contains(github.ref, '-rc.')
3939
timeout-minutes: 30
40-
run: ./gradlew ${GRADLE_SWITCHES} -Prelease.disableGitChecks=true -Prelease.useLastTag=true candidate publish closeAndReleaseSonatypeStagingRepository -x test
40+
run: ./gradlew ${GRADLE_SWITCHES} -Preleasing -Prelease.disableGitChecks=true -Prelease.useLastTag=true candidate publish closeAndReleaseSonatypeStagingRepository
4141
env:
4242
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
4343
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_TOKEN }}
@@ -47,7 +47,7 @@ jobs:
4747
- name: publish-release
4848
if: (!contains(github.ref, '-rc.'))
4949
timeout-minutes: 30
50-
run: ./gradlew ${GRADLE_SWITCHES} -Prelease.disableGitChecks=true -Prelease.useLastTag=true final publish closeAndReleaseSonatypeStagingRepository -x test
50+
run: ./gradlew ${GRADLE_SWITCHES} -Preleasing -Prelease.disableGitChecks=true -Prelease.useLastTag=true final publish closeAndReleaseSonatypeStagingRepository
5151
env:
5252
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
5353
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_TOKEN }}

build.gradle.kts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ plugins {
1010
`maven-publish`
1111
signing
1212

13-
id("org.jetbrains.kotlin.jvm") version "1.5.0"
13+
id("org.jetbrains.kotlin.jvm") version "1.5.10"
1414
id("nebula.maven-resolved-dependencies") version "17.3.2"
1515
id("nebula.release") version "15.3.1"
1616
id("io.github.gradle-nexus.publish-plugin") version "1.0.0"
@@ -43,9 +43,11 @@ group = "org.openrewrite.recipe"
4343
description = "Eliminate legacy Spring patterns and migrate between major Spring Boot versions. Automatically."
4444

4545
repositories {
46-
mavenLocal()
47-
maven {
48-
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
46+
if(!project.hasProperty("releasing")) {
47+
mavenLocal()
48+
maven {
49+
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
50+
}
4951
}
5052
mavenCentral()
5153
}
@@ -73,7 +75,12 @@ configurations.all {
7375
}
7476
}
7577

76-
val rewriteVersion = "latest.integration"
78+
val rewriteVersion = if(project.hasProperty("releasing")) {
79+
"latest.release"
80+
} else {
81+
"latest.integration"
82+
}
83+
7784
dependencies {
7885
compileOnly("org.projectlombok:lombok:latest.release")
7986
annotationProcessor("org.projectlombok:lombok:latest.release")

0 commit comments

Comments
 (0)