mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Forward UNITY_LICENSE var and add all platforms
This commit is contained in:
parent
6297618cb1
commit
a76c6a7321
29
.github/workflows/main.yml
vendored
29
.github/workflows/main.yml
vendored
@ -20,23 +20,18 @@ jobs:
|
||||
- 2019.2.11f1
|
||||
- 2019.3.0f1
|
||||
targetPlatform:
|
||||
- WebGL
|
||||
- iOS
|
||||
# - StandaloneOSX
|
||||
# - StandaloneWindows
|
||||
# - StandaloneWindows64
|
||||
# - StandaloneLinux64
|
||||
# - PS4
|
||||
# - XboxOne
|
||||
# - Switch
|
||||
# - Android
|
||||
# - tvOS
|
||||
# - Lumin
|
||||
# - BJM
|
||||
# - Stadia
|
||||
# - WSAPlayer
|
||||
# - Facebook
|
||||
# - NoTarget
|
||||
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
|
||||
- StandaloneWindows # Build a Windows standalone.
|
||||
- StandaloneWindows64 # Build a Windows 64-bit standalone.
|
||||
- StandaloneLinux64 # Build a Linux 64-bit standalone.
|
||||
- iOS # Build an iOS player.
|
||||
- Android # Build an Android .apk standalone app.
|
||||
- WebGL # WebGL.
|
||||
- WSAPlayer # Build an Windows Store Apps player.
|
||||
- PS4 # Build a PS4 Standalone.
|
||||
- XboxOne # Build a Xbox One Standalone.
|
||||
- tvOS # Build to Apple's tvOS platform.
|
||||
- Switch # Build a Nintendo Switch player.
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
41
README.md
41
README.md
@ -33,9 +33,28 @@ collection repository for workflow documentation and reference implementation.
|
||||
|
||||
Create or edit the file called `.github/workflows/main.yml` and add a job to it.
|
||||
|
||||
```yaml
|
||||
- uses: webbertakken/unity-builder@v0.5
|
||||
env:
|
||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||
with:
|
||||
projectPath: path/to/your/project
|
||||
unityVersion: 2020.X.XXXX
|
||||
targetPlatform: WebGL
|
||||
```
|
||||
|
||||
A complete workflow that builds every available platform could look like this:
|
||||
|
||||
```yaml
|
||||
name: Build project
|
||||
on: [push]
|
||||
|
||||
on:
|
||||
pull_request: {}
|
||||
push: { branches: [master] }
|
||||
|
||||
env:
|
||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||
|
||||
jobs:
|
||||
buildForSomePlatforms:
|
||||
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
|
||||
@ -47,19 +66,27 @@ jobs:
|
||||
- path/to/your/project
|
||||
unityVersion:
|
||||
- 2019.2.11f1
|
||||
- 2019.3.0f1
|
||||
targetPlatform:
|
||||
- WebGL
|
||||
- iOS
|
||||
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
|
||||
- StandaloneWindows # Build a Windows standalone.
|
||||
- StandaloneWindows64 # Build a Windows 64-bit standalone.
|
||||
- StandaloneLinux64 # Build a Linux 64-bit standalone.
|
||||
- iOS # Build an iOS player.
|
||||
- Android # Build an Android .apk standalone app.
|
||||
- WebGL # WebGL.
|
||||
- WSAPlayer # Build an Windows Store Apps player.
|
||||
- PS4 # Build a PS4 Standalone.
|
||||
- XboxOne # Build a Xbox One Standalone.
|
||||
- tvOS # Build to Apple's tvOS platform.
|
||||
- Switch # Build a Nintendo Switch player.
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: webbertakken/unity-activate@v1
|
||||
- uses: webbertakken/unity-builder@v0.3
|
||||
- uses: webbertakken/unity-builder@v0.5
|
||||
with:
|
||||
projectPath: ${{ matrix.projectPath }}
|
||||
unityVersion: ${{ matrix.unityVersion }}
|
||||
targetPlatform: ${{ matrix.targetPlatform }}
|
||||
- uses: webbertakken/unity-return-license@v1
|
||||
if: always()
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: Build
|
||||
|
File diff suppressed because one or more lines are too long
@ -23,6 +23,7 @@ export default class Docker {
|
||||
const command = `docker run \
|
||||
--workdir /github/workspace \
|
||||
--rm \
|
||||
--env UNITY_LICENSE \
|
||||
--env PROJECT_PATH=${projectPath} \
|
||||
--env BUILD_TARGET=${platform} \
|
||||
--env BUILD_NAME=${buildName} \
|
||||
|
Loading…
Reference in New Issue
Block a user