Build PHANTO #467
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: Build PHANTO | |
on: | |
workflow_dispatch: | |
pull_request: | |
schedule: | |
- cron: '0 5 * * *' # run at 5 AM UTC | |
jobs: | |
build: | |
name: Build PHANTO main branch | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout (with LFS) | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
sparse-checkout: | | |
Assets | |
Packages | |
Media | |
ProjectSettings | |
- name: Bump version code number | |
run: | |
echo "APK_VERSION_FROM_RUN=$(($GITHUB_RUN_NUMBER))" >> $GITHUB_ENV | |
- name: Cache Library | |
uses: actions/cache@v3 | |
with: | |
key: PHANTO-${{ github.run_id }} | |
path: | | |
Library | |
restore-keys: | | |
PHANTO- | |
- name: Free Up GitHub Actions Ubuntu Runner Disk Space | |
uses: jlumbroso/[email protected] | |
with: | |
tool-cache: false | |
android: true | |
dotnet: false | |
haskell: true | |
large-packages: false | |
swap-storage: false | |
- name: Build apk | |
uses: game-ci/unity-builder@v2 | |
env: | |
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
APK_VERSION_CODE: ${{ env.APK_VERSION_FROM_RUN }} | |
with: | |
allowDirtyBuild: true | |
targetPlatform: Android | |
unityVersion: 2022.3.4f1 | |
projectPath: . | |
buildsPath: | | |
builds | |
buildName: PHANTO-${{ github.run_id }} | |
androidVersionCode: ${{ env.APK_VERSION_FROM_RUN }} | |
- name: Store apk | |
uses: actions/upload-artifact@v2 | |
with: | |
name: PHANTO-${{ github.run_id }} | |
path: builds |