Skip to content

Commit 56cd564

Browse files
committed
Try fixing snapshot releases, attempt 1
1 parent 94ed352 commit 56cd564

File tree

2 files changed

+21
-25
lines changed

2 files changed

+21
-25
lines changed

.github/workflows/gradle_snapshot.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ jobs:
3232
- name: Grant execute permission for push
3333
run: chmod +x push_javadoc.sh
3434
- name: Build and Snapshot branch
35-
run: ./gradlew -PreleaseMode=branch -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build --stacktrace
35+
run: ./gradlew -PreleaseMode=branch build --stacktrace --no-daemon
36+
- name: Upload Snapshot
37+
run: ./gradlew -PreleaseMode=branch javadocCleanup uploadArchives --no-daemon --no-parallel --stacktrace
3638
env:
3739
# Define secrets at https://github.com/ReactiveX/RxJava/settings/secrets/actions
3840
# ------------------------------------------------------------------------------
39-
bintrayUser: ${{ secrets.BINTRAY_USER }}
40-
bintrayKey: ${{ secrets.BINTRAY_KEY }}
41-
sonatypeUsername: ${{ secrets.SONATYPE_USER }}
42-
sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
41+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USER }}
42+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
4343
- name: Upload to Codecov
4444
uses: codecov/codecov-action@v1
4545
- name: Push Javadocs

build.gradle

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ plugins {
77
id("ru.vyarus.animalsniffer") version "1.5.3"
88
id("me.champeau.gradle.jmh") version "0.5.3"
99
id("com.github.hierynomus.license") version "0.15.0"
10-
id("com.jfrog.artifactory") version "4.21.0"
1110
id("biz.aQute.bnd.builder") version "5.3.0"
1211
id("com.vanniktech.maven.publish") version "0.15.1"
1312
}
@@ -209,27 +208,24 @@ if (rootProject.hasProperty("releaseMode")) {
209208
logger.lifecycle("ReleaseMode: {}", rootProject.releaseMode)
210209

211210
if ("branch".equals(rootProject.releaseMode)) {
212-
// From https://github.com/ReactiveX/RxAndroid/blob/2.x/rxandroid/build.gradle#L94
213-
artifactory {
214-
contextUrl = "https://oss.jfrog.org"
215-
216-
publish {
217-
repository {
218-
repoKey = "oss-snapshot-local"
219-
220-
username = rootProject.bintrayUser
221-
password = rootProject.bintrayKey
222-
}
223-
224-
defaults {
225-
publishConfigs("archives")
226-
}
227-
228-
fixPom()
211+
212+
if (version.endsWith("-SNAPSHOT")) {
213+
fixPom()
214+
215+
publishing {
216+
repositories {
217+
maven {
218+
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
219+
}
229220
}
221+
}
222+
223+
mavenPublish {
224+
nexus {
225+
stagingProfile = "io.reactivex"
226+
}
227+
}
230228
}
231-
232-
build.finalizedBy(artifactoryPublish)
233229
}
234230

235231
if ("full".equals(rootProject.releaseMode)) {

0 commit comments

Comments
 (0)