Files
textdecalURP/.gitea/workflows/build.yaml
Kirill Chikalin 6af05ef363 disable telegram
2025-03-21 17:42:01 +03:00

84 lines
3.0 KiB
YAML

name: build
on:
- push
- pull_request
jobs:
# checklicense:
# name: Check for UNITY_LICENSE in GitHub Secrets
# runs-on: windows-host
# 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: windows-host
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:
# - name: Send Message To Telegram
# id: telegram
# uses: https://git.chikalin.space/actions/telegram-bot@master
# with:
# status: 🚀
- name: Set Unity license
run: |
export is_unity_license_set=true
echo "is_unity_license_set=$is_unity_license_set" >> $GITHUB_OUTPUT
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: true
- name: Cache
uses: actions/cache@v4.2.2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
- name: Build
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
buildProfile: 'Assets/Settings/Build Profiles/${{ matrix.targetPlatform }}-profile.asset'
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.targetPlatform }}
path: |
build/*.apk
build/*.aab
build/WebGL/*
- name: Send Job Status to Telegram
id: telegram-result
if: always()
uses: https://git.chikalin.space/actions/telegram-bot@master
with:
delete: ${{ steps.telegram.outputs.message_id }}