Repository navigation
181 lines (156 loc) · 6.7 KB
/
Copy pathpackage-plugin.yml
File metadata and controls
181 lines (156 loc) · 6.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
name: Package PlaneToPBR Plugin
on:
push:
tags:
- v*
workflow_dispatch:
inputs:
target-platforms:
description: Unreal target platforms passed to BuildPlugin.
required: true
default: Win64
ue-engine-dir:
description: Shared UE 5.8 engine directory for both plugin variants on the runner.
required: true
default: C:\Program Files\Epic Games\UE_5.8
publish-release:
description: Publish both plugin ZIPs to a GitHub release (run this workflow on a tag).
required: true
type: boolean
default: false
prerelease:
description: Mark the GitHub release as a prerelease.
required: true
type: boolean
default: true
permissions:
contents: write
jobs:
package-plugin:
runs-on: [self-hosted, windows]
strategy:
fail-fast: false
matrix:
include:
- variant: Standard
artifact: PlaneToPBR-plugin
zip: PlaneToPBR.zip
- variant: MCP
artifact: PlaneToPBRMCP-plugin
zip: PlaneToPBRMCP.zip
env:
UE_ENGINE_DIR: ${{ inputs.ue-engine-dir || vars.UE_ENGINE_DIR || 'C:\Program Files\Epic Games\UE_5.8' }}
PLANETOPBR_VARIANT: ${{ matrix.variant }}
PLUGIN_TARGET_PLATFORMS: ${{ inputs.target-platforms || vars.PLUGIN_TARGET_PLATFORMS || 'Win64' }}
GIT_CONFIG_COUNT: 1
GIT_CONFIG_KEY_0: safe.directory
GIT_CONFIG_VALUE_0: '*'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate packaging safeguards
shell: powershell -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command ". '{0}'"
run: .\Build\TestPlaneToPBRPackaging.ps1
- name: Run automation tests
shell: powershell -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command ". '{0}'"
run: .\Build\RunPlaneToPBRAutomationTests.ps1 -Variant $env:PLANETOPBR_VARIANT
- name: Package plugin
shell: powershell -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command ". '{0}'"
run: .\Build\PackagePlaneToPBRPlugin.ps1 -Variant $env:PLANETOPBR_VARIANT
- name: Independently smoke-test shipped ZIP
shell: powershell -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command ". '{0}'"
run: .\Build\SmokePlaneToPBRPackage.ps1 -Variant $env:PLANETOPBR_VARIANT
- name: Upload plugin artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: Artifacts/${{ matrix.zip }}
if-no-files-found: error
- name: Upload automation reports
if: always()
uses: actions/upload-artifact@v4
with:
name: PlaneToPBR-tests-${{ matrix.variant }}
path: Saved/Automation
if-no-files-found: warn
publish-release:
needs: package-plugin
runs-on: ubuntu-latest
env:
PLUGIN_TARGET_PLATFORMS: ${{ inputs.target-platforms || vars.PLUGIN_TARGET_PLATFORMS || 'Win64' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download standard ZIP
uses: actions/download-artifact@v4
with:
name: PlaneToPBR-plugin
path: Artifacts
- name: Download MCP ZIP
uses: actions/download-artifact@v4
with:
name: PlaneToPBRMCP-plugin
path: Artifacts
- name: Validate both release attachments
shell: pwsh
run: |
. ./Build/PlaneToPBRVariants.ps1
Assert-PlaneToPBRArchive -ZipPath "$PWD/Artifacts/PlaneToPBR.zip" -Variant Standard
Assert-PlaneToPBRArchive -ZipPath "$PWD/Artifacts/PlaneToPBRMCP.zip" -Variant MCP
- name: Resolve release settings
id: release
shell: pwsh
run: |
$shouldPublish = "${{ github.ref_type }}" -eq "tag" -or "${{ inputs.publish-release }}" -eq "true"
if ($shouldPublish -and "${{ github.ref_type }}" -ne "tag") {
throw "Publishing requires a tag ref. Select a tag when running this workflow manually, or push a new v* tag."
}
$tagName = "${{ github.ref_name }}"
if ($shouldPublish -and [string]::IsNullOrWhiteSpace($tagName)) {
throw "The workflow tag ref has no tag name."
}
$isPrerelease = "${{ inputs.prerelease }}"
if ("${{ github.ref_type }}" -eq "tag") {
$isPrerelease = "true"
}
"should-publish=$($shouldPublish.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT
"tag-name=$tagName" >> $env:GITHUB_OUTPUT
"is-prerelease=$($isPrerelease.ToLowerInvariant())" >> $env:GITHUB_OUTPUT
- name: Publish GitHub release
if: steps.release.outputs.should-publish == 'true'
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
run: |
$tagName = "${{ steps.release.outputs.tag-name }}"
$notes = @"
PlaneToPBR standard and MCP distributions.
### Download one variant
- PlaneToPBR.zip: standard editor plugin, built for UE 5.8; no MCP dependencies.
- PlaneToPBRMCP.zip: independently installable superset with the same editor UI plus MCP tools, built with the same UE 5.8 engine; requires its ModelContextProtocol and ToolsetRegistry engine plugins.
Each ZIP contains PlaneToPBR/PlaneToPBR.uplugin. Copy that folder into your project's Plugins directory. To switch variants, close the editor and replace the existing PlaneToPBR folder completely. Do not install both variants or another engine-level copy together.
### Includes
- PlaneToPBR editor tab
- Managed Hugging Face generation integration
- Generated texture import
- Material creation
- Displaced plane mesh/actor creation
- MCP variant only: full generation and granular texture, import, material, and displaced-mesh tools
### Validation
- Packaged by GitHub Actions from commit $env:GITHUB_SHA
- Built for target platforms: $env:PLUGIN_TARGET_PLATFORMS
- Both isolated builds, automation tests, archive inspections, and clean-host smoke checks must pass before publication.
"@
$releaseArgs = @(
"release", "create", $tagName,
"Artifacts/PlaneToPBR.zip",
"Artifacts/PlaneToPBRMCP.zip",
"--target", $env:GITHUB_SHA,
"--title", "PlaneToPBR $tagName",
"--notes", $notes
)
if ("${{ steps.release.outputs.is-prerelease }}" -eq "true") {
$releaseArgs += "--prerelease"
}
gh @releaseArgs
if ($LASTEXITCODE -ne 0) { throw "GitHub release publication failed." }