update unity, use text decal from git, add gitea workflow
This commit is contained in:
65
.gitea/workflows/build.yaml
Normal file
65
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
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@742a850b88e70342487c06e2f5b57675184b9503
|
||||
options: --volumes-from=${{ env.JOB_CONTAINER_NAME }}
|
||||
env:
|
||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
||||
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
||||
# JOB_CONTAINER_NAME: ${{ env.JOB_CONTAINER_NAME }}
|
||||
ACTION_FOLDER: /volume1/docker/gitea_actions/act/89fa79d6bd3aaa9f7d3b54bdd5ab294be883964442f1a7519922be8d66f94342/dist
|
||||
with:
|
||||
targetPlatform: ${{ matrix.targetPlatform }}
|
||||
dockerCpuLimit: 0
|
||||
RUNNER_TEMP: /volume1/docker/gitea_actions/act/temp
|
||||
buildProfile: Assets/Settings/Build Profiles/Android Release.asset
|
||||
dockerWorkspacePath: /volume1/docker/gitea_actions/workspace/unity/textdecalURP
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Build-${{ matrix.targetPlatform }}
|
||||
path: build
|
||||
Reference in New Issue
Block a user