Skip to content

Commit

Permalink
Try to use secrets.gpg
Browse files Browse the repository at this point in the history
  • Loading branch information
alorma committed Feb 28, 2024
1 parent 7fdeb02 commit c9d4778
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ jobs:
~/.gradle/wrapper
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}

- name: Prepare environment
env:
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
run: |
git fetch --unshallow
sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
# Runs upload, and then closes & releases the repository
- name: Publish to MavenLocal
run: ./gradlew publishReleasePublicationToMavenLocal --max-workers 1
Expand Down Expand Up @@ -92,14 +84,6 @@ jobs:
~/.gradle/wrapper
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}

- name: Prepare environment
env:
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
run: |
git fetch --unshallow
sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
# Runs upload, and then closes & releases the repository
- name: Publish to MavenCentral
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository --dry-run
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-root.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (secretPropsFile.exists()) {
ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID')
ext["signing.keyId"] = System.getenv('GPG_KEY_NAME')
ext["signing.password"] = System.getenv('GPG_PASSPHRASE')
ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE')
ext["signing.secretKeyRingFile"] = "../secrets.gpg"
}

// Set up Sonatype repository
Expand Down

0 comments on commit c9d4778

Please sign in to comment.