Skip to content

Commit 19d6234

Browse files
committed
Don't use secrets directly
1 parent 4fedeab commit 19d6234

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/actions/android/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ inputs:
44
sign-publication:
55
description: "Whether to sign the built library"
66
default: '1'
7+
gpg-key:
8+
required: false
9+
description: "The GPG key to use when signing the publication"
10+
gpg-password:
11+
required: false
12+
description: "Password for the GPG key."
713

814
runs:
915
using: "composite"
@@ -33,7 +39,7 @@ runs:
3339
if: ${{ inputs.sign-publication == '1' }}
3440
run: |
3541
cd android
36-
./gradlew build publishAllPublicationsToHereRepository -PgpgKey=${{ secrets.GPG_PRIVATE_KEY }} -PgpgPassword=${{ secrets.GPG_PASSWORD }}
42+
./gradlew build publishAllPublicationsToHereRepository -PgpgKey=${{ inputs.gpg-key }} -PgpgPassword=${{ inputs.gpg-password }}
3743
ls -lh build/outputs/aar
3844
find build/repository
3945

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
submodules: true
4343
- name: Build Android
4444
uses: ./.github/actions/android
45+
with:
46+
gpg-key: ${{ secrets.GPG_PRIVATE_KEY }}
47+
gpg-password: ${{ secrets.GPG_PASSWORD }}
4548

4649
publish_android:
4750
permissions:

0 commit comments

Comments
 (0)