Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
ci: use system environments for release (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
nattb8 authored Nov 28, 2022
1 parent 0f85a0d commit 789da89
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:

- run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signing.keyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signing.key: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signing.password: ${{ secrets.SIGNING_KEY_PASSWORD }}
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}

- name: Extract release notes
id: release_notes
Expand Down
13 changes: 6 additions & 7 deletions imx-core-sdk-kotlin-jvm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,10 @@ publishing {
signing {
required !version.endsWith('SNAPSHOT')
if (!version.endsWith('SNAPSHOT')) {
useInMemoryPgpKeys(
findProperty("signing.keyId"),
findProperty("signing.key"),
findProperty("signing.password"),
)
def keyId = findProperty("signing.keyId") ?: System.getenv("SIGNING_KEY_ID")
def key = findProperty("signing.key") ?: System.getenv("SIGNING_KEY")
def password = findProperty("signing.key") ?: System.getenv("SIGNING_KEY_PASSWORD")
useInMemoryPgpKeys(keyId, key, password)
sign publishing.publications
}
}
Expand All @@ -171,8 +170,8 @@ publishing {
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl

credentials {
username project.findProperty('mavenCentralUsername')
password project.findProperty('mavenCentralPassword')
username project.findProperty('mavenCentralUsername') ?: System.getenv("SONATYPE_NEXUS_USERNAME")
password project.findProperty('mavenCentralPassword') ?: System.getenv("SONATYPE_NEXUS_PASSWORD")
}
}
}
Expand Down

0 comments on commit 789da89

Please sign in to comment.