Skip to content

Commit

Permalink
Use environment variables in all CI steps
Browse files Browse the repository at this point in the history
  • Loading branch information
sitole committed Apr 20, 2022
1 parent 319d000 commit 68645f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ on:
release:
types: [ published ]

env:
# Gradle GPG Keys
GRADLE_GPG_SIGN_KEY: ${{ secrets.GRADLE_GPG_SIGN_KEY }}
GRADLE_GPG_SIGN_PASSWORD: ${{ secrets.GRADLE_GPG_SIGN_PASSWORD }}

# Sonatype
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -25,14 +34,5 @@ jobs:
working-directory: ./hubspot

- name: Publish library
env:
# Gradle GPG Keys
GRADLE_GPG_SIGN_KEY: ${{ secrets.GRADLE_GPG_SIGN_KEY }}
GRADLE_GPG_SIGN_PASSWORD: ${{ secrets.GRADLE_GPG_SIGN_PASSWORD }}

# Sonatype
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

run: ./gradlew publish
working-directory: ./hubspot
4 changes: 2 additions & 2 deletions hubspot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ java {
}

signing {
val signingKey: String = System.getenv("GRADLE_GPG_SIGN_KEY")
val signingPassword: String = System.getenv("GRADLE_GPG_SIGN_PASSWORD")
val signingKey: String? = System.getenv("GRADLE_GPG_SIGN_KEY")
val signingPassword: String? = System.getenv("GRADLE_GPG_SIGN_PASSWORD")

useInMemoryPgpKeys(signingKey, signingPassword)

Expand Down

0 comments on commit 68645f0

Please sign in to comment.