Skip to content

Commit 7dcc799

Browse files
ci: add job testing the key decoding
1 parent 81ee979 commit 7dcc799

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Test Keystore
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Setup Java
15+
uses: actions/setup-java@v4
16+
with:
17+
distribution: "temurin"
18+
java-version: "17"
19+
20+
- name: Decode and verify keystore
21+
run: |
22+
echo "Decoding keystore..."
23+
echo '${{ secrets.ANDROID_KEYSTORE_BASE64 }}' | base64 --decode > test.keystore
24+
25+
if [ -f test.keystore ]; then
26+
echo "✓ Keystore file created"
27+
echo "File size: $(wc -c < test.keystore) bytes"
28+
else
29+
echo "✗ Failed to create keystore file"
30+
exit 1
31+
fi
32+
33+
echo "Verifying keystore with keytool..."
34+
keytool -list -keystore test.keystore -storepass '${{ secrets.ANDROID_KEYSTORE_PASSWORD }}'
35+
36+
if [ $? -eq 0 ]; then
37+
echo "✓ Keystore is valid!"
38+
else
39+
echo "✗ Keystore verification failed"
40+
exit 1
41+
fi
42+
43+
- name: Clean up
44+
if: always()
45+
run: rm -f test.keystore

0 commit comments

Comments
 (0)