Skip to content

Commit

Permalink
Update to use in memory keys (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
randr0id committed Feb 10, 2022
1 parent d9a383c commit a0934f9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ jobs:
with:
distribution: adopt
java-version: 11
- name: Prepare environment
env:
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}
SIGNING_SECRET_KEY_FILE: ${{ secrets.SIGNING_SECRET_KEY_FILE }}
run: |
git fetch --unshallow
sudo bash -c "echo '$SIGNING_SECRET_KEY' | base64 -d > '$SIGNING_SECRET_KEY_FILE'"
- name: Release build
run: ./gradlew :fastscroll:assembleRelease
- name: Source and javadoc jars
Expand All @@ -32,7 +25,7 @@ jobs:
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
STAGING_PROFILE_ID: ${{ secrets.STAGING_PROFILE_ID }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_FILE: ${{ secrets.SIGNING_SECRET_KEY_FILE }}
STAGING_PROFILE_ID: ${{ secrets.STAGING_PROFILE_ID }}
9 changes: 5 additions & 4 deletions fastscroll/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ afterEvaluate {
}
}

ext["signing.keyId"] = rootProject.ext["signing.keyId"]
ext["signing.password"] = rootProject.ext["signing.password"]
ext["signing.secretKeyFile"] = rootProject.ext["signing.secretKeyFile"]

signing {
useInMemoryPgpKeys(
rootProject.ext["signing.keyId"],
rootProject.ext["signing.key"],
rootProject.ext["signing.password"]
)
sign publishing.publications
}
4 changes: 2 additions & 2 deletions nexus.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ext['ossrhUsername'] = ''
ext['ossrhPassword'] = ''
ext['sonatypeStagingProfileId'] = ''
ext['signing.key'] = ''
ext['signing.keyId'] = ''
ext['signing.password'] = ''
ext['signing.secretKeyFile'] = ''

File secretPropsFile = rootProject.file('local.properties')

Expand All @@ -17,9 +17,9 @@ if (secretPropsFile.exists()) {
ext['ossrhUsername'] = System.getenv('OSSRH_USERNAME')
ext['ossrhPassword'] = System.getenv('OSSRH_PASSWORD')
ext['sonatypeStagingProfileId'] = System.getenv('STAGING_PROFILE_ID')
ext['signing.key'] = System.getenv('SIGNING_KEY')
ext['signing.keyId'] = System.getenv('SIGNING_KEY_ID')
ext['signing.password'] = System.getenv('SIGNING_PASSWORD')
ext['signing.secretKeyFile'] = System.getenv('SIGNING_SECRET_KEY_FILE')
}

// Set up Sonatype repository
Expand Down

0 comments on commit a0934f9

Please sign in to comment.