Skip to content

Commit

Permalink
ORG_GRADLE_PROJECT
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippSchmelter committed Dec 6, 2024
1 parent 768015a commit 5b5881b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ jobs:
#Deployment
- name: Deploy
env:
MAVENCENTRAL_SIGNINGKEY: ${{ secrets.MAVENCENTRAL_SIGNINGKEY }}
MAVENCENTRAL_SIGNINGKEYID: ${{ secrets.MAVENCENTRAL_SIGNINGKEYID }}
MAVENCENTRAL_SIGNINGPASS: ${{ secrets.MAVENCENTRAL_SIGNINGPASS }}
MAVENCENTRAL_USER: ${{ secrets.MAVENCENTRAL_USER }}
MAVENCENTRAL_PASS: ${{ secrets.MAVENCENTRAL_PASS }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVENCENTRAL_SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.MAVENCENTRAL_SIGNINGKEYID }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVENCENTRAL_SIGNINGPASS }}
ORG_GRADLE_PROJECT_user: ${{ secrets.MAVENCENTRAL_USER }}
ORG_GRADLE_PROJECT_password: ${{ secrets.MAVENCENTRAL_PASS }}
run: |
currentVersion=$(./gradlew -q devVersion)
echo "currentVersion=$currentVersion"
Expand Down
12 changes: 6 additions & 6 deletions gradle/scripts/mavenCentralPublish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
}

if (project.hasProperty('MAVENCENTRAL_USER') && project.hasProperty('MAVENCENTRAL_PASS') && project.hasProperty('deployVersion')) {
if (project.hasProperty('user') && project.hasProperty('password') && project.hasProperty('deployVersion')) {

// snapshot version differs from normal version
String versionString = project.getProperty('deployVersion')
Expand Down Expand Up @@ -75,16 +75,16 @@ if (project.hasProperty('MAVENCENTRAL_USER') && project.hasProperty('MAVENCENTRA
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = versionString.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username project.getProperty('MAVENCENTRAL_USER')
password project.getProperty('MAVENCENTRAL_PASS')
username project.getProperty('user')
password project.getProperty('password')
}
}
}
signing {
useInMemoryPgpKeys(
findProperty('MAVENCENTRAL_SIGNINGKEY'),
findProperty('MAVENCENTRAL_SIGNINGKEYID'),
findProperty('MAVENCENTRAL_SIGNINGPASSWORD')
findProperty('signingKeyId'),
findProperty('signingKey'),
findProperty('signingPassword')
)
sign publishing.publications.mavenJava
}
Expand Down

0 comments on commit 5b5881b

Please sign in to comment.