Workflow file for this run
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: validate | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- '*' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
timeout-minutes: 20 | |
env: | |
UNITY_PROJECT_PATH: '' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-13] | |
unity-version: | |
- 2019.4.40f1 (ffc62b691db5) | |
- 2020.3.48f1 (b805b124c6b7) | |
- 2021.3.41f1 (6c5a9e20c022) | |
- 2022.3.40f1 (cbdda657d2f0) | |
- 6000.0.13f1 (53a692e3fca9) | |
include: # for each os specify the build targets | |
- os: ubuntu-latest | |
build-target: StandaloneLinux64 | |
- os: windows-latest | |
build-target: StandaloneWindows64 | |
- os: macos-13 | |
build-target: StandaloneOSX | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: RageAgainstThePixel/com.utilities.buildpipeine | |
path: com.utilities.buildpipline | |
ref: development | |
# Installs the Unity Editor based on your project version text file | |
# sets -> env.UNITY_EDITOR_PATH | |
# sets -> env.UNITY_PROJECT_PATH | |
- uses: buildalon/unity-setup@v1 | |
with: | |
build-targets: ${{ matrix.build-target }} | |
# Activates the installation with the provided credentials | |
- uses: buildalon/activate-unity-license@v1 | |
with: | |
license: 'Personal' | |
username: ${{ secrets.UNITY_USERNAME }} | |
password: ${{ secrets.UNITY_PASSWORD }} | |
- uses: ./ # buildalon/unity-action | |
name: Project Validation | |
with: | |
log-name: 'project-validation' | |
args: '-quit -nographics -batchmode -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.ValidateProject -importTMProEssentialsAsset' | |
- uses: ./ # buildalon/unity-action | |
name: '${{ matrix.build-target }}-Build' | |
with: | |
log-name: '${{ matrix.build-target }}-Build' | |
build-target: '${{ matrix.build-target }}' | |
args: '-quit -nographics -batchmode -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.StartCommandLineBuild -export -buildOutputDirectory ${{ env.UNITY_PROJECT_PATH }}/Builds/${{ matrix.build-target }}' | |
- uses: actions/upload-artifact@v4 | |
name: Upload Artifacts | |
if: always() | |
with: | |
name: '${{ github.run_number }}.${{ github.run_attempt }}-${{ runner.os }}-${{ matrix.build-target }}-${{ matrix.unity-version }}-Artifacts' | |
path: | | |
${{ env.UNITY_PROJECT_PATH }}/**/*.log | |
${{ env.UNITY_PROJECT_PATH }}/Builds/${{ matrix.build-target }}/ |