chore(release): 1.8.2 #6
Workflow file for this run
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: 'app-android' | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-android: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 21 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| with: | |
| packages: | | |
| ndk;26.1.10909125 | |
| - name: Setup Android Environment | |
| run: | | |
| echo "$ANDROID_HOME/platform-tools" >> $GITHUB_PATH | |
| echo "$ANDROID_HOME/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_PATH | |
| echo "NDK_HOME=$ANDROID_HOME/ndk/26.1.10909125/" > $GITHUB_ENV | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: 'npm' | |
| - name: Write mah build config | |
| run: | | |
| echo "{\"name\": \"Mah\", \"mobile\":true}" > custom-build-config.json | |
| - name: install mah dependencies | |
| run: npm install | |
| - name: Install tauri dependencies | |
| run: cd resources/apps && npm install | |
| - name: Decode Keystore | |
| env: | |
| ENCODED_STRING: ${{ secrets.KEYSTORE }} | |
| run: | | |
| echo $ENCODED_STRING | base64 -di > resources/apps/tauri/gen/android/app/mah_keystore.jks | |
| - name: setup Android signing | |
| run: | | |
| cd resources/apps/tauri/gen/android | |
| echo "keyAlias=${{ secrets.SIGNING_KEY_ALIAS }}" > keystore.properties | |
| echo "password=${{ secrets.SIGNING_KEY_PASSWORD }}" >> keystore.properties | |
| echo "storePassword=${{ secrets.SIGNING_STORE_PASSWORD }}" >> keystore.properties | |
| echo "storeFile=mah_keystore.jks" >> keystore.properties | |
| - name: Build Android app | |
| run: | | |
| cd resources/apps | |
| npm run android:apk | |
| - name: Upload Android artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: github.ref_type != 'tag' | |
| with: | |
| name: android-app | |
| retention-days: 10 | |
| path: | | |
| resources/apps/tauri/gen/android/app/build/outputs/apk/**/*.apk | |
| resources/apps/tauri/gen/android/app/build/outputs/bundle/**/*.aab | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: github.ref_type == 'tag' | |
| with: | |
| files: | | |
| resources/apps/tauri/gen/android/app/build/outputs/apk/**/*.apk | |
| resources/apps/tauri/gen/android/app/build/outputs/bundle/**/*.aab |