Skip to content

Commit 418ba86

Browse files
committed
Merge branch '3.5.x' of github.com:freefair/okhttp-spring-boot into 4.0.x
2 parents 2d46493 + 2f2e32f commit 418ba86

File tree

2 files changed

+58
-15
lines changed

2 files changed

+58
-15
lines changed

.github/workflows/gradle-publish.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ jobs:
1818
distribution: 'temurin'
1919
- name: Setup Gradle
2020
uses: gradle/gradle-build-action@v3
21-
- name: Publish package
22-
run: ./gradlew --no-parallel publishToSonatype uploadDocumentation closeAndReleaseSonatypeStagingRepository
21+
- name: Publish local
22+
run: ./gradlew publish
2323
env:
24-
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
25-
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }}
2624
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.FREEFAIR_SIGNING_KEY }}
2725
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.FREEFAIR_SIGNING_PASSWORD }}
28-
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
29-
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
26+
- name: Publish package
27+
run: ./gradlew --no-parallel uploadDocumentation jreleaserFullRelease
28+
env:
29+
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.MAVENCENTRAL_USERNAME }}
30+
JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.MAVENCENTRAL_PASSWORD }}
31+
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3032
ORG_GRADLE_PROJECT_freefairDocsUser: ${{ secrets.FREEFAIR_DOCS_USER }}
3133
ORG_GRADLE_PROJECT_freefairDocsPass: ${{ secrets.FREEFAIR_DOCS_PASS }}

build.gradle

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import io.freefair.gradle.plugins.okhttp.tasks.UploadFile
22

33
plugins {
44
id "org.springframework.boot" version "4.0.0-M1" apply false
5-
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
65
id "io.freefair.git-version"
76
id "io.freefair.okhttp"
87
id "io.freefair.maven-central.validate-poms" apply false
98
id "io.freefair.aggregate-javadoc"
9+
id 'org.jreleaser' version '1.19.0'
1010
}
1111

1212
allprojects {
@@ -90,20 +90,19 @@ allprojects {
9090
}
9191
}
9292
}
93+
94+
repositories {
95+
maven {
96+
name = "mavenCentralStaging"
97+
url = rootProject.layout.buildDirectory.dir('staging-deploy')
98+
}
99+
}
93100
}
94101
}
95102
}
96103

97104
apply plugin: "maven-publish"
98105

99-
nexusPublishing {
100-
repositories {
101-
sonatype {
102-
stagingProfileId = '7e6204597a774f'
103-
}
104-
}
105-
}
106-
107106
dependencies {
108107
javadoc project(":okhttp-spring-client")
109108
javadoc project(":okhttp-spring-boot-autoconfigure")
@@ -132,3 +131,45 @@ tasks.register('uploadDocumentation', UploadFile) {
132131
tasks.named('wrapper') {
133132
distributionType = Wrapper.DistributionType.BIN
134133
}
134+
135+
jreleaser {
136+
project {
137+
license = 'MIT'
138+
inceptionYear = '2016'
139+
}
140+
signing {
141+
active = 'NEVER'
142+
}
143+
release {
144+
github {
145+
repoOwner = "freefair"
146+
name = "okhttp-spring-boot"
147+
tagName = "$version"
148+
skipTag = true
149+
overwrite = false
150+
update {
151+
enabled = true
152+
}
153+
releaseNotes {
154+
enabled = false
155+
}
156+
changelog {
157+
enabled = true
158+
}
159+
}
160+
}
161+
deploy {
162+
maven {
163+
mavenCentral {
164+
sonatype {
165+
active = 'RELEASE'
166+
namespace = "io.freefair"
167+
url = 'https://central.sonatype.com/api/v1/publisher'
168+
sign = false //Already done by Gradle
169+
checksums = false //Already done by Gradle
170+
stagingRepository('build/staging-deploy')
171+
}
172+
}
173+
}
174+
}
175+
}

0 commit comments

Comments
 (0)