diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7c6070d..664da63 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,6 +5,9 @@ on: release: types: [released] +env: + SIGNING_KEY_RING_FILE: "${RUNNER_TEMP}key.gpg" + jobs: publish: name: Release build and publish @@ -29,7 +32,6 @@ jobs: - name: Create binary keyring env: GPG_KEY_CONTENTS: ${{ secrets.SONATYPE_BASE64_SIGNING_KEY }} - SIGNING_KEY_RING_FILE: "${TMPDIR}key.gpg" run: | git fetch --unshallow sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_KEY_RING_FILE'" @@ -40,7 +42,7 @@ jobs: # Publish aar to maven central via sonatype repository - name: Publish to MavenCentral - run: ./gradlew -PmavenCentralUsername=${{ secrets.OSSRH_USERNAME }} -PmavenCentralPassword="${{ secrets.OSSRH_PASSWORD }}" -Psigning.keyId=${{ secrets.SONATYPE_SIGNING_KEY_ID }} -Psigning.password="${{ secrets.SONATYPE_SIGNING_KEY_PASSWORD }}" -Psigning.secretKeyRingFile=$SIGNING_KEY_RING_FILE --no-parallel --no-daemon publishAndroidReleasePublicationToMavenCentralRepository closeAndReleaseRepository + run: ./gradlew -PmavenCentralUsername=${{ secrets.OSSRH_USERNAME }} -PmavenCentralPassword="${{ secrets.OSSRH_PASSWORD }}" -Psigning.keyId=${{ secrets.SONATYPE_SIGNING_KEY_ID }} -Psigning.password="${{ secrets.SONATYPE_SIGNING_KEY_PASSWORD }}" -Psigning.secretKeyRingFile="$SIGNING_KEY_RING_FILE" --no-parallel --no-daemon publishAndroidReleasePublicationToMavenCentralRepository closeAndReleaseRepository # Upload artifact as a release asset - name: Upload Release Asset