Skip to content

Commit

Permalink
[#3630] Make secret writing action more readable (#3631)
Browse files Browse the repository at this point in the history
* [#3628] Update android keystore

* [#3630] Make secret writing action more readable
  • Loading branch information
mustafaozhan authored Jun 30, 2024
1 parent dd9da8d commit 54ea1ee
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/actions/add-secret-files/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,36 @@ runs:
using: 'composite'
steps:
- run: |
# Save the Android Release Keystore
echo "${{ inputs.ANDROID_RELEASE_KEYSTORE_ASC }}" > release.keystore.asc
gpg -d --passphrase "${{ inputs.SECRET_PASSWORD }}" --batch release.keystore.asc > android/app/release.keystore
# Save google-services.json files
mkdir android/app/src/release
mkdir android/app/src/debug
echo "${{ inputs.GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
gpg -d --passphrase "${{ inputs.SECRET_PASSWORD }}" --batch google-services.json.asc > android/app/src/release/google-services.json
gpg -d --passphrase "${{ inputs.SECRET_PASSWORD }}" --batch google-services.json.asc > android/app/src/debug/google-services.json
# Save agconnect-services.json
echo "${{ inputs.AG_CONNECT_SERVICES_JSON_ASC }}" > agconnect-services.json.asc
gpg -d --passphrase "${{ inputs.SECRET_PASSWORD }}" --batch agconnect-services.json.asc > android/app/src/release/agconnect-services.json
echo "${{ inputs.GOOGLE_SERVICE_INFO_PLIST_ASC_RELEASE }}" > GoogleService-Info.plist.asc
# Save GoogleService-Info.plist files
mkdir ios/CCC/Resources/Release
gpg -d --passphrase "${{ inputs.SECRET_PASSWORD }}" --batch GoogleService-Info.plist.asc > ios/CCC/Resources/Release/GoogleService-Info.plist
rm GoogleService-Info.plist.asc
echo "${{ inputs.GOOGLE_SERVICE_INFO_PLIST_ASC_DEBUG }}" > GoogleService-Info.plist.asc
mkdir ios/CCC/Resources/Debug
gpg -d --passphrase "${{ inputs.SECRET_PASSWORD }}" --batch GoogleService-Info.plist.asc > ios/CCC/Resources/Debug/GoogleService-Info.plist
echo "${{ inputs.GOOGLE_SERVICE_INFO_PLIST_ASC_RELEASE }}" > Release-GoogleService-Info.plist.asc
gpg -d --passphrase "${{ inputs.SECRET_PASSWORD }}" --batch Release-GoogleService-Info.plist.asc > ios/CCC/Resources/Release/GoogleService-Info.plist
echo "${{ inputs.GOOGLE_SERVICE_INFO_PLIST_ASC_DEBUG }}" > Debug-GoogleService-Info.plist.asc
gpg -d --passphrase "${{ inputs.SECRET_PASSWORD }}" --batch Debug-GoogleService-Info.plist.asc > ios/CCC/Resources/Debug/GoogleService-Info.plist
# Save Config.xcconfig files
echo "${{ inputs.IOS_XCCONFIG_ASC_RELEASE }}" > Release.xcconfig.asc
gpg -d --passphrase "${{ inputs.SECRET_PASSWORD }}" --batch Release.xcconfig.asc > ios/CCC/Resources/Release/Config.xcconfig
echo "${{ inputs.IOS_XCCONFIG_ASC_DEBUG }}" > Debug.xcconfig.asc
gpg -d --passphrase "${{ inputs.SECRET_PASSWORD }}" --batch Debug.xcconfig.asc > ios/CCC/Resources/Debug/Config.xcconfig
# Save service_account.json
echo "${{ inputs.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}" > service_account.json.asc
gpg -d --passphrase "${{ inputs.SECRET_PASSWORD }}" --batch service_account.json.asc > service_account.json
shell: bash

0 comments on commit 54ea1ee

Please sign in to comment.