fix: play button is not moving when installing game #225
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: Android build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
android_build: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set short sha | |
shell: bash | |
run: echo "SHORT_SHA=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: aarch64-linux-android, armv7-linux-androideabi, x86_64-linux-android, i686-linux-android | |
- name: install Linux dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup NDK | |
uses: nttld/setup-ndk@v1 | |
id: setup-ndk | |
with: | |
ndk-version: r25b | |
local-cache: true | |
# TODO check after https://github.com/nttld/setup-ndk/issues/518 is fixed | |
- name: Restore Android Symlinks | |
run: | | |
directory="${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin" | |
find "$directory" -type l | while read link; do | |
current_target=$(readlink "$link") | |
new_target="$directory/$(basename "$current_target")" | |
ln -sf "$new_target" "$link" | |
echo "Changed $(basename "$link") from $current_target to $new_target" | |
done | |
- name: Install yarn deps | |
run: pnpm install | |
- name: Prettier | |
run: pnpm prettier | |
- name: Lint | |
run: pnpm lint | |
- name: Build interface | |
run: pnpm build | |
- name: fmt | |
run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check | |
- name: Clippy | |
run: cargo clippy --manifest-path=src-tauri/Cargo.toml --all-targets --all-features -- -D warnings | |
- name: build Apk | |
run: pnpm tauri android build --apk | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
STRONGHOLD_SALT: ${{ secrets.STRONGHOLD_SALT }} | |
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Sparus-${{ env.SHORT_SHA }} | |
path: src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk | |
if-no-files-found: error |