Merge pull request #689 from Adamant-im/fix/invalid-dash-wallet-key #88
This file contains 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: Capacitor [Android] | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
env: | |
GH_TOKEN: ${{ secrets.github_token }} | |
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | |
ANDROID_KEYSTORE_PATH: './app.keystore' # relative to `./android` dir | |
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }} | |
ANDROID_KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_ALIAS_PASSWORD }} | |
ANDROID_RELEASE_TYPE: 'AAB' # APK or AAB | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository 🛎️ | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Setup Node version 🍀 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies ⚙️ | |
run: npm ci | |
- name: Build PWA | |
run: | | |
npm run schema:generate | |
npm run build | |
- name: Extract Android signing key from ENV 🔑 | |
run: | | |
echo "$ANDROID_KEYSTORE_BASE64" > android/keystore.base64 | |
base64 -d android/keystore.base64 > android/app.keystore | |
rm android/keystore.base64 | |
- name: Build and Sign Android App 🛠️ | |
run: | | |
npx cap sync | |
npx cap build android \ | |
--keystorepath $ANDROID_KEYSTORE_PATH \ | |
--keystorepass $ANDROID_KEYSTORE_PASSWORD \ | |
--keystorealias $ANDROID_KEYSTORE_ALIAS \ | |
--keystorealiaspass $ANDROID_KEYSTORE_ALIAS_PASSWORD \ | |
--androidreleasetype $ANDROID_RELEASE_TYPE | |
- name: Save artifacts 💾 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: android-release-app | |
path: | | |
android/app/build/outputs/bundle/release/* | |
- name: Clean Keystore file 🧹 | |
run: | | |
rm android/app.keystore |