Add standalone code (Electron) #4
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: Build Android app | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| # СБОРКА ANDROID | |
| build-android: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '21' | |
| - name: Install root dependencies | |
| run: npm install | |
| - name: Capacitor Sync | |
| run: npx cap sync android | |
| - name: Decode Keystore | |
| run: | | |
| echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/my-release-key.jks | |
| - name: Chmod Gradle | |
| run: chmod +x android/gradlew | |
| - name: Build Signed Android APK | |
| run: | | |
| cd android | |
| ./gradlew assembleRelease \ | |
| -Pandroid.injected.signing.store.file=my-release-key.jks \ | |
| -Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} \ | |
| -Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} \ | |
| -Pandroid.injected.signing.key.password=${{ secrets.KEYSTORE_PASSWORD }} | |
| - name: Upload Signed APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: VisualTransfer-Android-APK | |
| path: android/app/build/outputs/apk/release/app-release.apk |