Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Initial Release! 🎉🚀
  • Loading branch information
StephenHodgson authored Aug 4, 2024
1 parent 2324a6f commit e85cf27
Show file tree
Hide file tree
Showing 20 changed files with 35,840 additions and 25 deletions.
45 changes: 43 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,52 @@ concurrency:
cancel-in-progress: true
jobs:
validate:
env:
UNITY_EDITORS: '' # set by the unity-setup action
UNITY_HUB_PATH: '' # set by the unity-setup action
UNITY_EDITOR_PATH: '' # set by the unity-setup action
UNITY_PROJECT_PATH: '' # set by the unity-setup action
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest ]
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
unity-versions:
- 2019.4.40f1 (ffc62b691db5)
- 2020.3.48f1 (b805b124c6b7)
- 2021.3.41f1 (6c5a9e20c022)
- 2022.3.40f1 (cbdda657d2f0)
- 6000.0.13f1 (53a692e3fca9)
include:
- os: ubuntu-latest
build-targets: StandaloneLinux64, Android, iOS
modules: linux-server
- os: windows-latest
build-targets: StandaloneWindows64, Android, WSAPlayer
modules: windows-server
- os: macos-13
build-targets: StandaloneOSX, Android, iOS
modules: mac-server
- os: macos-latest
build-targets: StandaloneOSX Android iOS VisionOS
modules: mac-server
steps:
- uses: actions/checkout@v4
- run: echo "hello world"
- uses: actions/checkout@v4
with:
repository: RageAgainstThePixel/com.utilities.buildpipeine
path: com.utilities.buildpipline
ref: development

- uses: ./ # RageAgainstThePixel/unity-setup
with:
# version-file: 'com.utilities.buildpipline/Utilities.BuildPipeline/ProjectSettings/ProjectVersion.txt'
unity-version: ${{ matrix.unity-versions }} # overrides the version in the version file
build-targets: ${{ matrix.build-targets }}
modules: ${{ matrix.modules }}

- run: |
echo "UNITY_HUB_PATH: '${{ env.UNITY_HUB_PATH }}'"
echo "UNITY_EDITORS: '${{ env.UNITY_EDITORS }}'"
echo "UNITY_EDITOR_PATH: '${{ env.UNITY_EDITOR_PATH }}'"
echo "UNITY_PROJECT_PATH: '${{ env.UNITY_PROJECT_PATH }}'"
47 changes: 42 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,57 @@
# github-action-js-template
# unity-setup

A GitHub Actions template repository for JavaScript based Actions
A GitHub Action for setting up the [Unity Game Engine](https://unity.com) on GitHub Action Runners.

## How to use

### workflow

```yaml
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
unity-versions: [2020.3.48f1 (b805b124c6b7), 2021.3.41f1 (6c5a9e20c022), 2022.3.40f1 (cbdda657d2f0)]
include:
- os: ubuntu-latest
build-targets: StandaloneLinux64, Android, iOS
modules: linux-server
- os: windows-latest
build-targets: StandaloneWindows64, Android, WSAPlayer
modules: windows-server
- os: macos-13
build-targets: StandaloneOSX, Android, iOS
modules: mac-server
- os: macos-latest
build-targets: StandaloneOSX, Android, iOS, VisionOS
modules: mac-server
steps:
- uses: RageAgainstThePixel/<github-action>@v1
- uses: RageAgainstThePixel/unity-setup@v1
with:
version-file: 'path/to/your/ProjectSettings.ProjectVersion.txt'
unity-version: ${{ matrix.unity-versions }} # overrides version in version-file
build-targets: ${{ matrix.build-targets }}
modules: ${{ matrix.modules }}

- run: |
echo "UNITY_HUB_PATH: '${{ env.UNITY_HUB_PATH }}'"
echo "UNITY_EDITORS: '${{ env.UNITY_EDITORS }}'"
echo "UNITY_EDITOR_PATH: '${{ env.UNITY_EDITOR_PATH }}'"
echo "UNITY_PROJECT_PATH: '${{ env.UNITY_PROJECT_PATH }}'"
```
### inputs
| name | description | required |
| ---- | ----------- | -------- |
| .... | ........... | ........ |
| ----------- | ----------- | ----------- |
| `version-file` | Specify a path to search for the unity project version text file. Useful if there are multiple projects in a single repo. | false |
| `unity-version` | Specify the Unity version(s) to install. You must include the changeset! i.e `2019.4.13f1 (518737b1de84)`. ***This will override any version specified in the `version-file`!*** | false |
| `build-targets` | Specify the build targets to install for. Remaps to corresponding module. One or more of `StandaloneWindows64` `WSAPlayer` `StandaloneOSX` `iOS` `StandaloneLinux64` `Android` `Lumin` `WebGL`. | false |
| `modules` | Modules to install with the editor. This list can be different per editor version. | false |
| `architecture` | Specify the architecture to install. Either `x86_64` or `arm64`. | false |

### outputs

- `UNITY_HUB_PATH`: The path to the installed unity hub.
- `UNITY_PROJECT_PATH`: The path to the Unity project.
- `UNITY_EDITOR_PATH`: The path to the last installed version of Unity.
- `UNITY_EDITORS`: A json object of each editor installation `{"version":"path"}`.
28 changes: 23 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
name: <github-action>
description: 'A GitHub Actions template repository for JavaScript based Actions'
# inputs:
# outputs:
name: 'unity-setup'
description: 'A GitHub action for setting up the Unity Game Engine for CI/CD workflows.'
inputs:
version-file:
description: 'Specify a path to search for the unity project version text file. Useful if there are multiple projects in a single repo.'
required: false
default: ''
unity-version:
description: 'Specify the Unity version(s) to install. You must include the changeset! i.e `2019.4.13f1 (518737b1de84)`. ***This will override any version specified in the `version-file`!***'
required: false
default: ''
build-targets:
description: 'Specify the build targets to install modules for. One or more of `StandaloneWindows64` `WSAPlayer` `StandaloneOSX` `iOS` `StandaloneLinux64` `Android` `Lumin` `WebGL`.'
required: false
default: ''
modules:
description: 'Modules to install with the editor. This list can be different per editor version.'
required: false
default: ''
architecture:
description: 'Specify the architecture to install. Either `x86_64` or `arm64`.'
required: false
default: ''
runs:
using: 'node20'
main: 'dist/index.js'
#post: 'dist/index.js'
Loading

0 comments on commit e85cf27

Please sign in to comment.