Skip to content

Commit 2f2e32f

Browse files
committed
Merge branch '3.4.x' of github.com:freefair/okhttp-spring-boot into 3.5.x
2 parents ce19cb7 + 8156a04 commit 2f2e32f

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 "3.5.4" 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")
@@ -131,3 +130,45 @@ tasks.register('uploadDocumentation', UploadFile) {
131130
tasks.named('wrapper') {
132131
distributionType = Wrapper.DistributionType.BIN
133132
}
133+
134+
jreleaser {
135+
project {
136+
license = 'MIT'
137+
inceptionYear = '2016'
138+
}
139+
signing {
140+
active = 'NEVER'
141+
}
142+
release {
143+
github {
144+
repoOwner = "freefair"
145+
name = "okhttp-spring-boot"
146+
tagName = "$version"
147+
skipTag = true
148+
overwrite = false
149+
update {
150+
enabled = true
151+
}
152+
releaseNotes {
153+
enabled = false
154+
}
155+
changelog {
156+
enabled = true
157+
}
158+
}
159+
}
160+
deploy {
161+
maven {
162+
mavenCentral {
163+
sonatype {
164+
active = 'RELEASE'
165+
namespace = "io.freefair"
166+
url = 'https://central.sonatype.com/api/v1/publisher'
167+
sign = false //Already done by Gradle
168+
checksums = false //Already done by Gradle
169+
stagingRepository('build/staging-deploy')
170+
}
171+
}
172+
}
173+
}
174+
}

0 commit comments

Comments
 (0)