File tree Expand file tree Collapse file tree 2 files changed +58
-15
lines changed Expand file tree Collapse file tree 2 files changed +58
-15
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,16 @@ jobs:
18
18
distribution : ' temurin'
19
19
- name : Setup Gradle
20
20
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
23
23
env :
24
- ORG_GRADLE_PROJECT_sonatypeUsername : ${{ secrets.OSSRH_USERNAME }}
25
- ORG_GRADLE_PROJECT_sonatypePassword : ${{ secrets.OSSRH_PASSWORD }}
26
24
ORG_GRADLE_PROJECT_signingKey : ${{ secrets.FREEFAIR_SIGNING_KEY }}
27
25
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 }}
30
32
ORG_GRADLE_PROJECT_freefairDocsUser : ${{ secrets.FREEFAIR_DOCS_USER }}
31
33
ORG_GRADLE_PROJECT_freefairDocsPass : ${{ secrets.FREEFAIR_DOCS_PASS }}
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ import io.freefair.gradle.plugins.okhttp.tasks.UploadFile
2
2
3
3
plugins {
4
4
id " org.springframework.boot" version " 4.0.0-M1" apply false
5
- id " io.github.gradle-nexus.publish-plugin" version " 2.0.0"
6
5
id " io.freefair.git-version"
7
6
id " io.freefair.okhttp"
8
7
id " io.freefair.maven-central.validate-poms" apply false
9
8
id " io.freefair.aggregate-javadoc"
9
+ id ' org.jreleaser' version ' 1.19.0'
10
10
}
11
11
12
12
allprojects {
@@ -90,20 +90,19 @@ allprojects {
90
90
}
91
91
}
92
92
}
93
+
94
+ repositories {
95
+ maven {
96
+ name = " mavenCentralStaging"
97
+ url = rootProject. layout. buildDirectory. dir(' staging-deploy' )
98
+ }
99
+ }
93
100
}
94
101
}
95
102
}
96
103
97
104
apply plugin : " maven-publish"
98
105
99
- nexusPublishing {
100
- repositories {
101
- sonatype {
102
- stagingProfileId = ' 7e6204597a774f'
103
- }
104
- }
105
- }
106
-
107
106
dependencies {
108
107
javadoc project(" :okhttp-spring-client" )
109
108
javadoc project(" :okhttp-spring-boot-autoconfigure" )
@@ -132,3 +131,45 @@ tasks.register('uploadDocumentation', UploadFile) {
132
131
tasks. named(' wrapper' ) {
133
132
distributionType = Wrapper.DistributionType . BIN
134
133
}
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
+ }
You can’t perform that action at this time.
0 commit comments