From c0b4031b8ce0fc27b08affcc10897725894d9bf2 Mon Sep 17 00:00:00 2001 From: izzy2lost Date: Sat, 8 Mar 2025 11:38:27 -0500 Subject: [PATCH] Update build-sm64.yml --- .github/workflows/build-sm64.yml | 38 +++++++++----------------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-sm64.yml b/.github/workflows/build-sm64.yml index 2ceea50..3fe3f88 100644 --- a/.github/workflows/build-sm64.yml +++ b/.github/workflows/build-sm64.yml @@ -1,7 +1,8 @@ -name: Build and Upload sm64coopdx APK +name: Build APK with Valid Docker Image on: - workflow_dispatch: + push: + branches: [main] jobs: build: @@ -14,42 +15,23 @@ jobs: uses: actions/checkout@v4 - name: Start Android emulator - uses: docker://budtmo/docker-android:emulator_30_google_apis_x86_64 + uses: docker://budtmo/docker-android:emulator_30 with: args: > -e ANDROID_DEVICE="Nexus 5" - -e EMULATOR_ARGS="-no-window -no-audio -no-boot-anim -writable-system" - -e ARCH=${{ matrix.arch }} + -e EMULATOR_ARGS="-no-window -no-audio -no-boot-anim" + -e ARCH=${{ matrix.arch }} # armv7 uses Houdini; arm64 uses native emulation -v ${{ github.workspace }}:/root/workspace - - name: Wait for emulator + - name: Install Termux and build APK run: | - adb wait-for-device - while [ "$(adb shell getprop sys.boot_completed | tr -d '\r')" != "1" ]; do - sleep 5 - done - - - name: Install Termux - run: | - curl -L -o termux.apk "https://f-droid.org/repo/com.termux_$(curl -s https://api.github.com/repos/termux/termux-app/releases/latest | grep -oP '"tag_name": "\K[^"]+').apk" + # Install Termux and push your script adb install termux.apk - - - name: Push and run build script - run: | - # Push your build script adb push myscript.sh /data/data/com.termux/files/home/ - - # Make script executable and run it - adb shell "chmod +x /data/data/com.termux/files/home/myscript.sh" adb shell "cd /data/data/com.termux/files/home && ./myscript.sh" - - name: Pull APK from emulator - run: | - # Pull the built APK - adb pull /data/data/com.termux/files/home/build/us_pc/sm64coopdx.apk sm64coopdx-${{ matrix.arch }}.apk - - - name: Upload APK artifact - uses: actions/upload-artifact@v4 + - name: Upload APK + uses: actions/upload-artifact@v3 with: name: sm64coopdx-${{ matrix.arch }} path: sm64coopdx-${{ matrix.arch }}.apk