diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 161c474..56e6f62 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 @@ -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 diff --git a/hubspot/build.gradle.kts b/hubspot/build.gradle.kts index 7b777cc..2a224da 100644 --- a/hubspot/build.gradle.kts +++ b/hubspot/build.gradle.kts @@ -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)