Skip to content

Commit

Permalink
Fixes #24 Unable to Upload to the Central Repository
Browse files Browse the repository at this point in the history
* Change build script to write all secrets to gradle.properties
  • Loading branch information
oliverspryn committed Feb 27, 2023
1 parent 0b13f67 commit 87629ae
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/publish-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,19 @@ jobs:
distribution: 'temurin'
cache: gradle

- name: Write Out GPG Key
- name: Write Out Secrets to Gradle
run: |
echo centralUsername=$CENTRAL_REPOSITORY_USERNAME >> gradle.properties
echo centralPassword=$CENTRAL_REPOSITORY_PASSWORD >> gradle.properties
echo GPG_SIGNING_KEY=$GPG_SIGNING_KEY >> gradle.properties
echo GPG_SIGNING_KEY_PASSWORD=$GPG_SIGNING_KEY_PASSWORD >> gradle.properties
env:
CENTRAL_REPOSITORY_USERNAME: ${{ secrets.CENTRAL_REPOSITORY_USERNAME }}
CENTRAL_REPOSITORY_PASSWORD: ${{ secrets.CENTRAL_REPOSITORY_PASSWORD }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_KEY_PASSWORD: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }}

- name: Publish the Library
uses: gradle/gradle-build-action@v2
with:
arguments: |
publishMultimodalSpannerPublicationToCentralRepository
-PcentralUsername=$CENTRAL_REPOSITORY_USERNAME
-PcentralPassword=$CENTRAL_REPOSITORY_PASSWORD
env:
CENTRAL_REPOSITORY_USERNAME: ${{ secrets.CENTRAL_REPOSITORY_USERNAME }}
CENTRAL_REPOSITORY_PASSWORD: ${{ secrets.CENTRAL_REPOSITORY_PASSWORD }}
arguments: publishMultimodalSpannerPublicationToCentralRepository

0 comments on commit 87629ae

Please sign in to comment.