Skip to content

Commit 17028db

Browse files
committed
fix: reference environment variables correctly in Github Action
The local.properties file was being written with the literal strings of the environment variable names instead of their values. This change ensures the correct values are used when decoding the keystore and writing to local.properties.
1 parent 6a0c898 commit 17028db

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/android.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ jobs:
5151
bundle install
5252
5353
- name: Decode Keystore File
54-
run: echo "${{ secrets.KEYSTORE_FILE }}" | base64 -d > $KEYSTORE_FILE
54+
run: echo "${{ secrets.KEYSTORE_FILE }}" | base64 -d > "${{ env.KEYSTORE_FILE }}"
5555

5656
- name: Write local.properties
5757
run: |
5858
echo "sdk.dir=$ANDROID_HOME" > local.properties
59-
echo "KEYSTORE_FILE=$KEYSTORE_FILE" >> local.properties
60-
echo "KEYSTORE_PASSWORD=$KEYSTORE_PASSWORD" >> local.properties
61-
echo "KEY_ALIAS=$KEY_ALIAS" >> local.properties
62-
echo "KEY_PASSWORD=$KEY_PASSWORD" >> local.properties
59+
echo "KEYSTORE_FILE=${{ env.KEYSTORE_FILE }}" >> local.properties
60+
echo "KEYSTORE_PASSWORD=${{ env.KEYSTORE_PASSWORD }}" >> local.properties
61+
echo "KEY_ALIAS=${{ env.KEY_ALIAS }}" >> local.properties
62+
echo "KEY_PASSWORD=${{ env.KEY_PASSWORD }}" >> local.properties
6363
6464
- name: Create Google Service Account JSON
6565
run: |

0 commit comments

Comments
 (0)