Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
name: build
permissions:
contents: read
on:
workflow_call:
inputs:
Expand All @@ -10,10 +8,10 @@ on:
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{ fromJSON(inputs.matrix) }}
fail-fast: false
runs-on: ${{ matrix.os }}
permissions:
contents: read
timeout-minutes: 30
Expand All @@ -26,12 +24,12 @@ jobs:
steps:
- name: Free Disk Space
if: ${{ matrix.os == 'ubuntu-latest' && (matrix.unity-version != '2018' && matrix.unity-version != '2017.4.40f1') }}
uses: endersonmenezes/free-disk-space@713d134e243b926eba4a5cce0cf608bfd1efb89a # v2.1.1
uses: endersonmenezes/free-disk-space@e6ed9b02e683a3b55ed0252f1ee469ce3b39a885 # v3.1.0
with:
remove_android: true
remove_dotnet: false
remove_tool_cache: false
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: ./ # buildalon/unity-setup
id: unity-setup
with:
Expand Down Expand Up @@ -73,17 +71,17 @@ jobs:
echo "Error: UNITY_EDITORS env and output do not match!"
exit 1
fi

if [[ "${ENV_UNITY_EDITOR_PATH}" != "${STEPS_UNITY_EDITOR_PATH}" ]]; then
echo "Error: UNITY_EDITOR_PATH env and output do not match!"
exit 1
fi

if [[ "${ENV_UNITY_PROJECT_PATH}" != "${STEPS_UNITY_PROJECT_PATH}" ]]; then
echo "Error: UNITY_PROJECT_PATH env and output do not match!"
exit 1
fi

# If unity-version is None, UNITY_EDITOR_PATH must be empty
if [[ "${{ matrix.unity-version }}" == "None" ]]; then
if [[ -n "${{ env.UNITY_EDITOR_PATH }}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-release-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: RageAgainstThePixel/update-action-release-tags@v1
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
sparse-checkout: .github/
- uses: RageAgainstThePixel/job-builder@v1
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ steps:
| `install-path` | Specify the path where Unity will be installed to. | false |
| `auto-update-hub` | Automatically update Unity Hub to the latest version before installing Unity Editors. Can be `true` or `false`. Default is `true`. | false |
| `hub-version` | Specify a specific version of Unity Hub to install. Example: `3.12.0`. When set, `auto-update-hub` is automatically disabled. | false |
| `cache-installation` | Cache the Unity installation between workflow runs to speed up subsequent runs. Can be `true` or `false`. Default is `false`. | false |

> [!NOTE]
> `cache-installation` does not apply to the Unity Hub installation, only to Unity Editor installations.

#### unity-version formats

Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ inputs:
description: 'Specify a specific version of Unity Hub to install. Example: `3.12.0`. When set, auto-update-hub is automatically disabled.'
required: false
default: ''
cache-installation:
description: 'Cache the Unity installation between workflow runs to speed up subsequent runs. Can be `true` or `false`.'
required: false
default: 'false'
outputs:
unity-hub-path:
description: 'The file path to the Unity Hub installation.'
Expand All @@ -47,3 +51,4 @@ outputs:
runs:
using: node24
main: dist/index.js
post: dist/index.js
Loading
Loading