mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Prepare readme for v0.1 pre-release
This commit is contained in:
parent
139aaece6d
commit
6cdeb78e18
64
README.md
64
README.md
@ -10,3 +10,67 @@ action from the
|
|||||||
[Unity Actions](https://github.com/webbertakken/unity-actions)
|
[Unity Actions](https://github.com/webbertakken/unity-actions)
|
||||||
collection before running this action. This action also requires the [Activation](https://github.com/marketplace/actions/unity-activate) step.
|
collection before running this action. This action also requires the [Activation](https://github.com/marketplace/actions/unity-activate) step.
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
See the
|
||||||
|
[Unity Actions](https://github.com/webbertakken/unity-actions)
|
||||||
|
collection repository for workflow documentation and reference implementation.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Create or edit the file called `.github/workflows/main.yml` and add a job to it.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Build project
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
buildForWebGL:
|
||||||
|
name: Build for WebGL 🕸
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
```
|
||||||
|
|
||||||
|
Configure the builder as follows:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Configure builder
|
||||||
|
- name: Build project
|
||||||
|
id: buildStep
|
||||||
|
uses: webbertakken/unity-builder@v0.1 # WIP (only webgl for now)
|
||||||
|
env:
|
||||||
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
|
|
||||||
|
# Optional: Path to your project, leave blank for "./"
|
||||||
|
UNITY_PROJECT_PATH: path/to/your/project
|
||||||
|
|
||||||
|
# Name for your build
|
||||||
|
BUILD_NAME: TestBuild
|
||||||
|
|
||||||
|
# Optional: Builds path, leave blank for "build"
|
||||||
|
BUILDS_PATH: build
|
||||||
|
|
||||||
|
# Target platform for your build
|
||||||
|
BUILD_TARGET: WebGL
|
||||||
|
|
||||||
|
# Optional: <StaticBuildClass.StaticMethod>, defaults to Builder.BuildProject
|
||||||
|
BUILD_COMMAND: ""
|
||||||
|
```
|
||||||
|
|
||||||
|
You use the id to **upload your built files** like so:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Upload distributables
|
||||||
|
- name: Upload Build
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: Build
|
||||||
|
path: ${{ steps.buildStep.outputs.allBuildsPath }}
|
||||||
|
```
|
||||||
|
|
||||||
|
Commit and push your workflow definition.
|
||||||
|
|
||||||
|
## More actions
|
||||||
|
|
||||||
|
Visit
|
||||||
|
[Unity Actions](https://github.com/webbertakken/unity-actions)
|
||||||
|
to find related actions for Unity.
|
||||||
|
Loading…
Reference in New Issue
Block a user