Skip to content

Commit 6d7b169

Browse files
unity-action@v3.0.0 (#14)
- refactored action to use unity-cli@v1.5.0
1 parent a5a2e6d commit 6d7b169

File tree

16 files changed

+55538
-20995
lines changed

16 files changed

+55538
-20995
lines changed

.github/workflows/build-options.json

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,42 @@
55
"macos-latest"
66
],
77
"unity-version": [
8-
"2022.3.x",
9-
"6000.0.x",
10-
"6000.1.x",
11-
"6000"
8+
"2019",
9+
"2020",
10+
"2022",
11+
"6000.0",
12+
"6000.1",
13+
"6000.2"
1214
],
1315
"include": [
1416
{
1517
"os": "ubuntu-latest",
1618
"build-target": "StandaloneLinux64"
1719
},
20+
{
21+
"os": "ubuntu-latest",
22+
"build-target": "WebGL",
23+
"build-args": "-colorSpace Gamma"
24+
},
25+
{
26+
"os": "ubuntu-latest",
27+
"build-target": "Android"
28+
},
1829
{
1930
"os": "windows-latest",
2031
"build-target": "StandaloneWindows64"
2132
},
33+
{
34+
"os": "windows-latest",
35+
"build-target": "Android"
36+
},
2237
{
2338
"os": "macos-latest",
2439
"build-target": "StandaloneOSX"
40+
},
41+
{
42+
"os": "macos-latest",
43+
"build-target": "iOS"
2544
}
2645
]
2746
}

.github/workflows/build.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,54 +21,54 @@ jobs:
2121
runs-on: ${{ matrix.os }}
2222
permissions:
2323
contents: read
24-
env:
25-
UNITY_PROJECT_PATH: ${{ github.workspace }}/Test Project
2624
steps:
27-
- uses: actions/checkout@v4
28-
- uses: buildalon/unity-setup@v1
25+
- name: Free Disk Space
26+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.unity-version == '6000.2' }}
27+
uses: endersonmenezes/free-disk-space@713d134e243b926eba4a5cce0cf608bfd1efb89a # v2.1.1
28+
with:
29+
remove_android: true
30+
remove_dotnet: false
31+
remove_tool_cache: false
32+
- uses: actions/checkout@v5
33+
- uses: buildalon/unity-setup@main
2934
with:
3035
version-file: None
3136
build-targets: ${{ matrix.build-target }}
3237
unity-version: ${{ matrix.unity-version }}
33-
- name: Get Unity Template
34-
id: template
35-
shell: bash
36-
run: ./.github/workflows/scripts/get-unity-template.sh 'com.unity.template.3d(-cross-platform)?'
37-
- uses: buildalon/activate-unity-license@v1
38+
- uses: buildalon/activate-unity-license@main
3839
with:
3940
license: Personal
4041
username: ${{ secrets.UNITY_USERNAME }}
4142
password: ${{ secrets.UNITY_PASSWORD }}
42-
- uses: ./ # buildalon/unity-action
43-
name: Create Test Project
43+
- uses: buildalon/create-unity-project@main
44+
id: unity-project
4445
with:
45-
log-name: create-test-project
46-
args: '-quit -nographics -batchmode -createProject "${{ env.UNITY_PROJECT_PATH }}" -cloneFromTemplate "${{ steps.template.outputs.TEMPLATE_PATH }}"'
46+
project-name: Test Project
4747
- name: Add Build Pipeline Package
4848
run: |
4949
npm install -g openupm-cli
50-
openupm add com.virtualmaker.buildalon
51-
working-directory: ${{ env.UNITY_PROJECT_PATH }}
50+
openupm add com.utilities.buildpipeline
51+
working-directory: ${{ steps.unity-project.outputs.project-path }}
5252
shell: bash
5353
- uses: ./ # buildalon/unity-action
5454
name: ${{ matrix.build-target }}-Validate
5555
with:
5656
build-target: ${{ matrix.build-target }}
57-
project-path: ${{ env.UNITY_PROJECT_PATH }}
57+
project-path: ${{ steps.unity-project.outputs.project-path }}
5858
log-name: ${{ matrix.build-target }}-Validate
59-
args: '-quit -nographics -batchmode -executeMethod Buildalon.Editor.BuildPipeline.UnityPlayerBuildTools.ValidateProject -importTMProEssentialsAsset'
60-
- uses: ./ # buildalon/unity-action
59+
args: -quit -nographics -batchmode -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.ValidateProject -importTMProEssentialsAsset
60+
- uses: ./ # buildalon/unity-action
6161
name: ${{ matrix.build-target }}-Build
6262
with:
6363
build-target: ${{ matrix.build-target }}
64-
project-path: ${{ env.UNITY_PROJECT_PATH }}
64+
project-path: ${{ steps.unity-project.outputs.project-path }}
6565
log-name: ${{ matrix.build-target }}-Build
66-
args: '-quit -nographics -batchmode -executeMethod Buildalon.Editor.BuildPipeline.UnityPlayerBuildTools.StartCommandLineBuild -sceneList Assets/Scenes/SampleScene.unity'
66+
args: -quit -nographics -batchmode -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.StartCommandLineBuild -sceneList Assets/Scenes/SampleScene.unity ${{ matrix.build-args }}
6767
- uses: actions/upload-artifact@v4
6868
name: Upload Artifacts
6969
if: always()
7070
with:
71-
name: ${{ github.run_number }}.${{ github.run_attempt }} ${{ matrix.unity-version }} ${{ matrix.name }} Artifacts
71+
name: ${{ github.run_number }}.${{ github.run_attempt }} ${{ matrix.os }} ${{ matrix.unity-version }} ${{ matrix.build-target }} Artifacts
7272
path: |
7373
${{ github.workspace }}/**/*.log
7474
${{ github.workspace }}/**/Builds/${{ matrix.build-target }}/

.github/workflows/scripts/get-unity-template.sh

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/update-release-tags.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
permissions:
1010
contents: write
1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v5
1313
with:
1414
fetch-depth: 0
1515
- uses: RageAgainstThePixel/update-action-release-tags@v1

.github/workflows/validate.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
permissions:
1919
contents: read
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v5
2222
with:
2323
sparse-checkout: .github/
2424
- uses: RageAgainstThePixel/job-builder@v1
@@ -42,3 +42,12 @@ jobs:
4242
uses: ./.github/workflows/build.yml
4343
with:
4444
matrix: ${{ toJSON(matrix.jobs.matrix) }}
45+
timeline:
46+
needs: [setup, validate]
47+
if: always()
48+
runs-on: ubuntu-latest
49+
permissions:
50+
contents: read
51+
steps:
52+
- uses: Kesin11/actions-timeline@c2f474758e8e9ac6f37ec64a6442dead7fd1dad2 # v2.2.5
53+
continue-on-error: true

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ jobs:
2323
- os: macos-latest
2424
build-target: StandaloneOSX
2525
steps:
26-
- uses: buildalon/unity-action@v2
27-
name: '${{ matrix.build-target }}-Build'
26+
- uses: buildalon/unity-action@v3
27+
name: ${{ matrix.build-target }}-Build
2828
with:
29-
editor-path: 'path/to/your/unity/editor/installation'
30-
project-path: 'path/to/your/unity/project'
31-
log-name: '${{ matrix.build-target }}-Build'
32-
build-target: '${{ matrix.build-target }}'
33-
args: '-quit -nographics -batchmode'
29+
editor-path: path/to/your/unity/editor/installation
30+
project-path: path/to/your/unity/project
31+
log-name: ${{ matrix.build-target }}-Build
32+
build-target: ${{ matrix.build-target }}
33+
args: -quit -nographics -batchmode
3434
```
3535
3636
### Inputs

0 commit comments

Comments
 (0)