Skip to content

Commit 9fb1ee7

Browse files
committed
Enhance workflows: Add author and license information to workflow files and improve formatting consistency
1 parent b4a923d commit 9fb1ee7

10 files changed

Lines changed: 157 additions & 58 deletions

.github/actions/setup-unity-mcp/action.yml

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
1-
name: 'Setup Unity MCP'
2-
description: 'Start MCP Server and Unity Editor in Docker containers with license activation'
1+
# ┌──────────────────────────────────────────────────────────────────┐
2+
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
3+
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
4+
# │ Copyright (c) 2025 Ivan Murzak │
5+
# │ Licensed under the Apache License, Version 2.0. │
6+
# │ See the LICENSE file in the project root for more information. │
7+
# └──────────────────────────────────────────────────────────────────┘
8+
9+
name: "Setup Unity MCP"
10+
description: "Start MCP Server and Unity Editor in Docker containers with license activation"
311

412
inputs:
513
unity-email:
6-
description: 'Unity account email for license activation'
14+
description: "Unity account email for license activation"
715
required: true
816
unity-password:
9-
description: 'Unity account password for license activation'
17+
description: "Unity account password for license activation"
1018
required: true
1119
unity-mcp-tools:
12-
description: 'Comma-separated list of MCP tool IDs to enable (optional)'
20+
description: "Comma-separated list of MCP tool IDs to enable (optional)"
1321
required: false
14-
default: ''
22+
default: ""
1523

1624
runs:
17-
using: 'composite'
25+
using: "composite"
1826
steps:
1927
- name: Read Unity version
2028
id: unity-version
@@ -59,7 +67,7 @@ runs:
5967
- name: Setup Node.js
6068
uses: actions/setup-node@v4
6169
with:
62-
node-version: '20'
70+
node-version: "20"
6371

6472
- name: Install unity-license-activate
6573
run: npm install --global unity-license-activate
@@ -89,10 +97,23 @@ runs:
8997

9098
- name: Activate Unity license
9199
run: |
92-
unity-license-activate \
93-
"${{ inputs.unity-email }}" \
94-
"${{ inputs.unity-password }}" \
95-
"${{ steps.alf.outputs.alf_path }}"
100+
MAX_RETRIES=5
101+
for attempt in $(seq 1 $MAX_RETRIES); do
102+
echo "=== License activation attempt $attempt of $MAX_RETRIES ==="
103+
if unity-license-activate \
104+
"${{ inputs.unity-email }}" \
105+
"${{ inputs.unity-password }}" \
106+
"${{ steps.alf.outputs.alf_path }}"; then
107+
echo "unity-license-activate succeeded on attempt $attempt"
108+
break
109+
fi
110+
if [ "$attempt" -eq "$MAX_RETRIES" ]; then
111+
echo "All $MAX_RETRIES license activation attempts failed"
112+
exit 1
113+
fi
114+
echo "Attempt $attempt failed, retrying in 10s..."
115+
sleep 10
116+
done
96117
97118
echo "--- Searching for .ulf file in workspace root ---"
98119
find "${GITHUB_WORKSPACE}" -maxdepth 1 -name "*.ulf" -ls 2>/dev/null

.github/workflows/bump_version.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# ┌──────────────────────────────────────────────────────────────────┐
2+
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
3+
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
4+
# │ Copyright (c) 2025 Ivan Murzak │
5+
# │ Licensed under the Apache License, Version 2.0. │
6+
# │ See the LICENSE file in the project root for more information. │
7+
# └──────────────────────────────────────────────────────────────────┘
8+
19
name: bump version
210

311
on:

.github/workflows/claude.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# ┌──────────────────────────────────────────────────────────────────┐
2+
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
3+
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
4+
# │ Copyright (c) 2025 Ivan Murzak │
5+
# │ Licensed under the Apache License, Version 2.0. │
6+
# │ See the LICENSE file in the project root for more information. │
7+
# └──────────────────────────────────────────────────────────────────┘
8+
19
name: Claude Code
210

311
on:
@@ -44,7 +52,7 @@ jobs:
4452
with:
4553
unity-email: ${{ secrets.UNITY_EMAIL }}
4654
unity-password: ${{ secrets.UNITY_PASSWORD }}
47-
unity-mcp-tools: 'assets-refresh,console-get-logs,script-execute,tests-run'
55+
unity-mcp-tools: "assets-refresh,console-get-logs,script-execute,tests-run"
4856

4957
- name: Run Claude Code
5058
id: claude

.github/workflows/copilot-setup-steps.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# ┌──────────────────────────────────────────────────────────────────┐
2+
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
3+
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
4+
# │ Copyright (c) 2025 Ivan Murzak │
5+
# │ Licensed under the Apache License, Version 2.0. │
6+
# │ See the LICENSE file in the project root for more information. │
7+
# └──────────────────────────────────────────────────────────────────┘
8+
19
name: "Copilot Setup Steps"
210

311
# Automatically run the setup steps when they are changed to allow for easy validation, and
@@ -33,4 +41,4 @@ jobs:
3341
with:
3442
unity-email: ${{ secrets.UNITY_EMAIL }}
3543
unity-password: ${{ secrets.UNITY_PASSWORD }}
36-
unity-mcp-tools: 'assets-refresh,console-get-logs,script-execute,tests-run'
44+
unity-mcp-tools: "assets-refresh,console-get-logs,script-execute,tests-run"

.github/workflows/deploy.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# ┌──────────────────────────────────────────────────────────────────┐
2+
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
3+
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
4+
# │ Copyright (c) 2025 Ivan Murzak │
5+
# │ Licensed under the Apache License, Version 2.0. │
6+
# │ See the LICENSE file in the project root for more information. │
7+
# └──────────────────────────────────────────────────────────────────┘
8+
19
name: deploy
210

311
on:
@@ -7,17 +15,17 @@ on:
715
workflow_dispatch:
816
inputs:
917
version:
10-
description: 'Deploy to NuGet and Docker Hub version (e.g., 1.0.0).'
18+
description: "Deploy to NuGet and Docker Hub version (e.g., 1.0.0)."
1119
required: true
1220
type: string
1321

1422
workflow_call:
1523
inputs:
1624
version: { required: true, type: string }
1725
secrets:
18-
NUGET_API_KEY: { required: true }
19-
DOCKER_USERNAME: { required: true }
20-
DOCKER_PASSWORD: { required: true }
26+
NUGET_API_KEY: { required: true }
27+
DOCKER_USERNAME: { required: true }
28+
DOCKER_PASSWORD: { required: true }
2129

2230
jobs:
2331
deploy-mcp-server-to-nuget:
@@ -36,7 +44,7 @@ jobs:
3644
- name: Setup .NET
3745
uses: actions/setup-dotnet@v4
3846
with:
39-
dotnet-version: '9.0.x'
47+
dotnet-version: "9.0.x"
4048

4149
- name: Restore dependencies
4250
run: |
@@ -102,4 +110,4 @@ jobs:
102110
ivanmurzakdev/unity-mcp-server:latest
103111
platforms: linux/amd64,linux/arm64
104112
cache-from: type=gha
105-
cache-to: type=gha,mode=max
113+
cache-to: type=gha,mode=max
Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# ┌──────────────────────────────────────────────────────────────────┐
2+
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
3+
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
4+
# │ Copyright (c) 2025 Ivan Murzak │
5+
# │ Licensed under the Apache License, Version 2.0. │
6+
# │ See the LICENSE file in the project root for more information. │
7+
# └──────────────────────────────────────────────────────────────────┘
8+
19
# This workflow builds the MCP server executables for all platforms and uploads them as release assets.
210
# It is triggered when a new release is published manually.
311
# It is NOT triggered by CI/CD pipelines or other automated processes.
@@ -12,25 +20,25 @@ jobs:
1220
build-and-zip:
1321
runs-on: macos-latest
1422
steps:
15-
- name: Checkout repository
16-
uses: actions/checkout@v4
17-
18-
- name: Setup .NET
19-
uses: actions/setup-dotnet@v4
20-
with:
21-
dotnet-version: '9.0.x'
22-
23-
- name: Make build script executable
24-
run: chmod +x ./Unity-MCP-Server/build-all.sh
25-
26-
- name: Build executables for all platforms
27-
shell: bash {0}
28-
run: cd Unity-MCP-Server && ./build-all.sh Release
29-
30-
- name: Upload release assets
31-
uses: softprops/action-gh-release@v2
32-
with:
33-
files: ./Unity-MCP-Server/publish/*.zip
34-
tag_name: ${{ github.event.release.tag_name }}
35-
env:
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup .NET
27+
uses: actions/setup-dotnet@v4
28+
with:
29+
dotnet-version: "9.0.x"
30+
31+
- name: Make build script executable
32+
run: chmod +x ./Unity-MCP-Server/build-all.sh
33+
34+
- name: Build executables for all platforms
35+
shell: bash {0}
36+
run: cd Unity-MCP-Server && ./build-all.sh Release
37+
38+
- name: Upload release assets
39+
uses: softprops/action-gh-release@v2
40+
with:
41+
files: ./Unity-MCP-Server/publish/*.zip
42+
tag_name: ${{ github.event.release.tag_name }}
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# ┌──────────────────────────────────────────────────────────────────┐
2+
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
3+
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
4+
# │ Copyright (c) 2025 Ivan Murzak │
5+
# │ Licensed under the Apache License, Version 2.0. │
6+
# │ See the LICENSE file in the project root for more information. │
7+
# └──────────────────────────────────────────────────────────────────┘
8+
19
name: release
210

311
on:
@@ -338,7 +346,13 @@ jobs:
338346

339347
publish_discord:
340348
runs-on: ubuntu-latest
341-
needs: [release-unity-plugin, publish-unity-installer, publish-mcp-server, deploy]
349+
needs:
350+
[
351+
release-unity-plugin,
352+
publish-unity-installer,
353+
publish-mcp-server,
354+
deploy,
355+
]
342356
if: |
343357
always() &&
344358
needs.release-unity-plugin.result == 'success' &&

.github/workflows/test_pull_request.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# ┌──────────────────────────────────────────────────────────────────┐
2+
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
3+
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
4+
# │ Copyright (c) 2025 Ivan Murzak │
5+
# │ Licensed under the Apache License, Version 2.0. │
6+
# │ See the LICENSE file in the project root for more information. │
7+
# └──────────────────────────────────────────────────────────────────┘
8+
19
name: test-pull-request
210

311
on:

.github/workflows/test_pull_request_manual.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# ┌──────────────────────────────────────────────────────────────────┐
2+
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
3+
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
4+
# │ Copyright (c) 2025 Ivan Murzak │
5+
# │ Licensed under the Apache License, Version 2.0. │
6+
# │ See the LICENSE file in the project root for more information. │
7+
# └──────────────────────────────────────────────────────────────────┘
8+
19
name: test-pull-request
210

311
on:

.github/workflows/test_unity_plugin.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# ┌──────────────────────────────────────────────────────────────────┐
2+
# │ Author: Ivan Murzak (https://github.com/IvanMurzak) │
3+
# │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
4+
# │ Copyright (c) 2025 Ivan Murzak │
5+
# │ Licensed under the Apache License, Version 2.0. │
6+
# │ See the LICENSE file in the project root for more information. │
7+
# └──────────────────────────────────────────────────────────────────┘
8+
19
name: test-unity-plugin
210

311
##############################################################################
@@ -6,12 +14,12 @@ name: test-unity-plugin
614
on:
715
workflow_call:
816
inputs:
9-
projectPath: { required: true, type: string }
10-
unityVersion: { required: true, type: string }
11-
testMode: { required: true, type: string }
17+
projectPath: { required: true, type: string }
18+
unityVersion: { required: true, type: string }
19+
testMode: { required: true, type: string }
1220
secrets:
13-
UNITY_LICENSE: { required: true }
14-
UNITY_EMAIL: { required: true }
21+
UNITY_LICENSE: { required: true }
22+
UNITY_EMAIL: { required: true }
1523
UNITY_PASSWORD: { required: true }
1624

1725
##############################################################################
@@ -81,22 +89,22 @@ jobs:
8189
- uses: game-ci/unity-test-runner@v4
8290
id: tests
8391
env:
84-
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
85-
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
92+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
93+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
8694
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
8795
with:
88-
projectPath: ${{ inputs.projectPath }}
89-
unityVersion: ${{ inputs.unityVersion }}
90-
testMode: ${{ inputs.testMode }}
91-
customImage: ${{ steps.custom_image.outputs.image }}
92-
githubToken: ${{ secrets.GITHUB_TOKEN }}
93-
checkName: ${{ inputs.unityVersion }} ${{ inputs.testMode }} ${{ matrix.platform }} Test Results
94-
artifactsPath: artifacts-${{ inputs.unityVersion }}-${{ inputs.testMode }}-${{ matrix.platform }}
96+
projectPath: ${{ inputs.projectPath }}
97+
unityVersion: ${{ inputs.unityVersion }}
98+
testMode: ${{ inputs.testMode }}
99+
customImage: ${{ steps.custom_image.outputs.image }}
100+
githubToken: ${{ secrets.GITHUB_TOKEN }}
101+
checkName: ${{ inputs.unityVersion }} ${{ inputs.testMode }} ${{ matrix.platform }} Test Results
102+
artifactsPath: artifacts-${{ inputs.unityVersion }}-${{ inputs.testMode }}-${{ matrix.platform }}
95103
customParameters: -CI true -GITHUB_ACTIONS true
96104

97105
# --------------------------------------------------------------------- #
98106
- uses: actions/upload-artifact@v4
99107
if: always()
100108
with:
101109
name: Test results for ${{ inputs.unityVersion }} ${{ inputs.testMode }} on ${{ matrix.platform }}
102-
path: ${{ steps.tests.outputs.artifactsPath }}
110+
path: ${{ steps.tests.outputs.artifactsPath }}

0 commit comments

Comments
 (0)