Update android.yaml #3
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 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: game-ci/unity-builder@v4 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
with: | |
unity-version: 2022.3.29f1 | |
download-unity-editor: true | |
cache-unity-editor: true | |
cache-unity-projects: true | |
- name: Install Android SDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
- name: Install Android NDK | |
run: | | |
wget -nv https://dl.google.com/android/repository/android-ndk-r25-linux-x86_64.zip | |
unzip android-ndk-r25-linux-x86_64.zip | |
export ANDROID_NDK_HOME=$PWD/android-ndk-r25 | |
echo "export ANDROID_NDK_HOME=$PWD/android-ndk-r25" >> $GITHUB_ENV | |
- name: Install Android SDK Tools | |
run: | | |
echo "y" | sdkmanager "platform-tools" "build-tools;31.0.0" "platforms;android-31" "cmdline-tools;latest" | |
- name: Build Android project | |
run: | | |
cd . | |
./Unity -batchmode -quit -executeMethod BuildAndroid | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Android Build | |
path: UnityProject/Builds/Android |