Skip to content

Commit

Permalink
fix(build): Set Sonatype repo url in build file
Browse files Browse the repository at this point in the history
Release failed when initializing the nexus staging repository:
Expected URL scheme 'http' or 'https' but was 'file'.

It looks like the property was not read from release.yml.
Hard-coding it in the build file instead.
  • Loading branch information
matrei committed Mar 10, 2024
1 parent 7d9cf41 commit 54b80b6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
ORG_GRADLE_PROJECT_sonatypeOssUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypeOssPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeOssStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
ORG_GRADLE_PROJECT_sonatypeOssRepo: 'https://s01.oss.sonatype.org/service/local/'
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
with:
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ if (isReleaseVersion) {
String ossUser = project.findProperty('sonatypeOssUsername') ?: ''
String ossPass = project.findProperty('sonatypeOssPassword') ?: ''
String ossStagingProfileId = project.findProperty('sonatypeOssStagingProfileId') ?: ''
String ossRepo = project.findProperty('sonatypeOssRepo') ?: ''
repositories {
sonatype {
nexusUrl = uri(ossRepo)
nexusUrl = uri('https://s01.oss.sonatype.org/service/local/')
username = ossUser
password = ossPass
stagingProfileId = ossStagingProfileId
Expand Down

0 comments on commit 54b80b6

Please sign in to comment.