Files
textdecalURP/.gitea/workflows/build.yaml
Kirill Chikalin 52d006474d test android build
2025-03-04 18:31:11 +03:00

62 lines
2.2 KiB
YAML

name: build
on:
- push
- pull_request
jobs:
checklicense:
name: Check for UNITY_LICENSE in GitHub Secrets
runs-on: ubuntu-latest
outputs:
is_unity_license_set: ${{ steps.checklicense_job.outputs.is_unity_license_set }}
steps:
- name: Check whether unity activation requests should be done
id: checklicense_job
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
run: |
echo "Skip activation job: ${{ env.UNITY_LICENSE != '' }}"
export is_unity_license_set="${{ env.UNITY_LICENSE != '' }}"
echo "is_unity_license_set=$is_unity_license_set" >> $GITHUB_OUTPUT
build:
name: Build for ${{ matrix.targetPlatform }}
needs: checklicense
runs-on:
- ubuntu-latest
container:
volumes:
- /volume1/docker/gitea_actions/act:/volume1/docker/gitea_actions/act
- /volume1/docker/gitea_actions/workspace:/volume1/docker/gitea_actions/workspace
strategy:
fail-fast: false
matrix:
targetPlatform:
- Android
# - WebGL
steps:
- uses: actions/checkout@v4.2.2
with:
lfs: true
- uses: actions/cache@v4.2.2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
- uses: https://git.chikalin.space/unity/unity-builder@f685e64b813aa72a6e0b45f4c0ac1a44e7cec87b
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
ACTION_FOLDER: /volume1/docker/gitea_actions/act/2f7ed7e14b5204eb0b805d660c8b513dafe695ebe4f34553a617791ad465d82a/dist
with:
targetPlatform: ${{ matrix.targetPlatform }}
dockerCpuLimit: 0
RUNNER_TEMP: /volume1/docker/gitea_actions/act/temp
dockerWorkspacePath: /volume1/docker/gitea_actions/workspace/unity/textdecalURP # this is from volume
- uses: actions/upload-artifact@v3
with:
name: Build-${{ matrix.targetPlatform }}
path: build