refactor(ci-cd): Move prepare keystore out

This commit is contained in:
Myzel394 2023-09-18 19:15:55 +02:00
parent b5272e8d1c
commit c3f078879f
No known key found for this signature in database
GPG Key ID: 79CC92F37B3E1A2B
2 changed files with 36 additions and 12 deletions

View File

@ -0,0 +1,31 @@
name: Prepare KeyStore
description: Write the KeyStore file and properties to disk
inputs:
signingStorePassword:
description: 'The password for the KeyStore'
required: true
signingKeyPassword:
description: 'The password for the Key'
required: true
signingKeyAlias:
description: 'The alias for the Key'
required: true
runs:
using: composite
steps:
- name: Write Keystore file 🗄️
id: android_keystore
uses: timheuer/base64-to-file@v1.0.3
with:
fileName: key.jks
encodedString: ${{ secrets.KEYSTORE }}
- name: Write Keystore properties 🗝️
shell: bash
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > key.properties
echo "storePassword=${{ inputs.signingStorePassword }}" >> key.properties
echo "keyPassword=${{ inputs.signingKeyPassword }}" >> key.properties
echo "keyAlias=${{ inputs.signingKeyAlias }}" >> key.properties

View File

@ -12,19 +12,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Write Keystore file 🗄️
id: android_keystore
uses: timheuer/base64-to-file@v1.0.3
- name: Write KeyStore 🗝️
uses: ./.github/actions/prepare-keystore
with:
fileName: key.jks
encodedString: ${{ secrets.KEYSTORE }}
- name: Write Keystore properties 🗝️
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > key.properties
echo "storePassword=${{ secrets.SIGNING_STORE_PASSWORD }}" >> key.properties
echo "keyPassword=${{ secrets.SIGNING_KEY_PASSWORD }}" >> key.properties
echo "keyAlias=${{ secrets.SIGNING_KEY_ALIAS }}" >> key.properties
signingStorePassword: ${{ secrets.SIGNING_STORE_PASSWORD }}
signingKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
signingKeyAlias: ${{ secrets.SIGNING_KEY_ALIAS }}
- name: Setup Java
uses: actions/setup-java@v3