fix welcomeview contexts #96
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: AndroidBuild | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| build-android: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # ---------------------- | |
| # Node / pnpm | |
| # ---------------------- | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v5 | |
| # pnpm cache | |
| - name: Cache pnpm | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.pnpm-store | |
| key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm- | |
| - run: pnpm install | |
| # ---------------------- | |
| # Rust | |
| # ---------------------- | |
| - uses: dtolnay/rust-toolchain@stable | |
| # Rust cache | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| cache-on-failure: true | |
| - name: Add Android targets | |
| run: | | |
| rustup target add aarch64-linux-android | |
| rustup target add armv7-linux-androideabi | |
| rustup target add x86_64-linux-android | |
| # ---------------------- | |
| # Android | |
| # ---------------------- | |
| - uses: android-actions/setup-android@v4 | |
| # Gradle cache | |
| - name: Cache Gradle | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| # ---------------------- | |
| # Inject keystore | |
| # ---------------------- | |
| - name: Restore keystore | |
| run: | | |
| mkdir -p src-tauri/gen/android | |
| echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > src-tauri/gen/android/app/keystore.jks | |
| - name: Create keystore.properties | |
| run: | | |
| cat <<EOF > src-tauri/gen/android/keystore.properties | |
| keyAlias=${{ secrets.ANDROID_KEY_ALIAS }} | |
| password=${{ secrets.ANDROID_KEY_PASSWORD }} | |
| storeFile=keystore.jks | |
| EOF | |
| # ---------------------- | |
| # build | |
| # ---------------------- | |
| - run: pnpm build | |
| - name: Build Android | |
| run: pnpm tauri android build | |
| # ---------------------- | |
| # artifact | |
| # ---------------------- | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: android-build | |
| path: | | |
| src-tauri/gen/android/app/build/outputs/**/*.apk | |
| src-tauri/gen/android/app/build/outputs/**/*.aab |