Skip to content

Commit

Permalink
Use the action runner's temp dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Brooks committed Nov 11, 2021
1 parent 5fce13f commit be10d9e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
release:
types: [released]

env:
SIGNING_KEY_RING_FILE: "${RUNNER_TEMP}key.gpg"

jobs:
publish:
name: Release build and publish
Expand All @@ -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'"
Expand All @@ -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
Expand Down

0 comments on commit be10d9e

Please sign in to comment.