Test Keystore #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Keystore | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: "17" | |
| - name: Decode and verify keystore | |
| run: | | |
| echo "Decoding keystore..." | |
| echo '${{ secrets.ANDROID_KEYSTORE_BASE64 }}' | base64 --decode > test.keystore | |
| if [ -f test.keystore ]; then | |
| echo "✓ Keystore file created" | |
| echo "File size: $(wc -c < test.keystore) bytes" | |
| else | |
| echo "✗ Failed to create keystore file" | |
| exit 1 | |
| fi | |
| echo "Verifying keystore with keytool..." | |
| keytool -list -keystore test.keystore -storepass '${{ secrets.ANDROID_KEYSTORE_PASSWORD }}' | |
| if [ $? -eq 0 ]; then | |
| echo "✓ Keystore password is valid!" | |
| else | |
| echo "✗ Keystore verification failed" | |
| exit 1 | |
| fi | |
| echo "Verifying key alias and key password..." | |
| keytool -list -keystore test.keystore \ | |
| -storepass '${{ secrets.ANDROID_KEYSTORE_PASSWORD }}' \ | |
| -alias '${{ secrets.ANDROID_KEY_ALIAS }}' \ | |
| -keypass '${{ secrets.ANDROID_KEY_PASSWORD }}' | |
| if [ $? -eq 0 ]; then | |
| echo "✓ Key alias and password are valid!" | |
| else | |
| echo "✗ Key alias or key password verification failed" | |
| exit 1 | |
| fi | |
| - name: Clean up | |
| if: always() | |
| run: rm -f test.keystore |