Skip to content

Commit bf69629

Browse files
committed
ci(main): bundle Classic test resources
Fetch ccccxp/LeagueSkins main with a shallow sparse checkout limited to classic/ and resources/. Package those files beside the Rose portable payload instead of mixing external assets into the application directory. Add a bilingual test README with the exact Windows copy destinations and safeguards against creating nested classic/classic paths. Record the LeagueSkins repository, branch, and resolved commit in every archive. Validation: - Parsed the workflow as YAML. - Verified a sparse checkout at LeagueSkins 2cc2808c contains 1,526 Classic archives and 21 language mapping files. - Verified the README names both %LOCALAPPDATA%\Rose destinations. - git diff --check passed. Review notes: - Regular skins are intentionally excluded from this test artifact. - Classic resources remain separate from the Rose executable payload and require manual merge/overwrite. - The workflow still produces a portable ZIP only; no installer is generated.
1 parent 9bc687e commit bf69629

2 files changed

Lines changed: 87 additions & 4 deletions

File tree

.github/workflows/main-portable.yml

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ jobs:
2727
- name: Check out main
2828
uses: actions/checkout@v5
2929

30+
- name: Fetch Classic test resources
31+
shell: pwsh
32+
run: |
33+
git clone --branch main --single-branch --depth 1 --filter=blob:none --sparse https://github.com/ccccxp/LeagueSkins.git _resources/LeagueSkins
34+
git -C _resources/LeagueSkins sparse-checkout set classic resources
35+
3036
- name: Set up Python
3137
uses: actions/setup-python@v6
3238
with:
@@ -44,9 +50,22 @@ jobs:
4450
shell: pwsh
4551
run: |
4652
$payload = "dist/Rose"
53+
$resourceRepo = "_resources/LeagueSkins"
54+
$classicSource = "$resourceRepo/classic"
55+
$mappingSource = "$resourceRepo/resources"
56+
$readme = "packaging/README-CLASSIC-TESTING.txt"
4757
if (-not (Test-Path "$payload/Rose.exe" -PathType Leaf)) {
4858
throw "Rose.exe was not produced"
4959
}
60+
if (-not (Get-ChildItem $classicSource -Recurse -Filter *.fantome -File | Select-Object -First 1)) {
61+
throw "LeagueSkins Classic archives were not fetched"
62+
}
63+
if (-not (Test-Path "$mappingSource/default/skin_ids.json" -PathType Leaf)) {
64+
throw "LeagueSkins shared skin mappings were not fetched"
65+
}
66+
if (-not (Test-Path $readme -PathType Leaf)) {
67+
throw "Classic testing README was not found"
68+
}
5069
5170
$pluginRoot = @(
5271
"$payload/_internal/Pengu Loader/plugins",
@@ -78,10 +97,32 @@ jobs:
7897
}
7998
}
8099
81-
New-Item -ItemType Directory -Force -Path artifacts | Out-Null
100+
$bundle = "bundle"
101+
New-Item -ItemType Directory -Force -Path `
102+
artifacts, `
103+
"$bundle/Rose", `
104+
"$bundle/Classic-Resources/classic", `
105+
"$bundle/Classic-Resources/resources" | Out-Null
106+
Copy-Item "$payload/*" "$bundle/Rose" -Recurse -Force
107+
Copy-Item "$classicSource/*" "$bundle/Classic-Resources/classic" -Recurse -Force
108+
Copy-Item "$mappingSource/*" "$bundle/Classic-Resources/resources" -Recurse -Force
109+
Copy-Item $readme "$bundle/README-CLASSIC-TESTING.txt" -Force
110+
111+
$resourceSha = (git -C $resourceRepo rev-parse HEAD).Trim()
112+
$sourceNote = @(
113+
"Classic resource repository: https://github.com/ccccxp/LeagueSkins",
114+
"Branch: main",
115+
"Commit: $resourceSha"
116+
) -join "`n"
117+
[IO.File]::WriteAllText(
118+
"$bundle/Classic-Resources/RESOURCE-SOURCE.txt",
119+
"$sourceNote`n",
120+
[Text.UTF8Encoding]::new($false)
121+
)
122+
82123
$shortSha = "${{ github.sha }}".Substring(0, 8)
83-
$archive = "artifacts/Rose-main-portable-$shortSha.zip"
84-
Compress-Archive -Path $payload -DestinationPath $archive -CompressionLevel Optimal
124+
$archive = "artifacts/Rose-main-classic-test-$shortSha.zip"
125+
Compress-Archive -Path "$bundle/*" -DestinationPath $archive -CompressionLevel Optimal
85126
$hash = (Get-FileHash $archive -Algorithm SHA256).Hash.ToLowerInvariant()
86127
$checksum = "$hash $([IO.Path]::GetFileName($archive))`n"
87128
[IO.File]::WriteAllText(
@@ -93,7 +134,7 @@ jobs:
93134
- name: Upload portable artifact
94135
uses: actions/upload-artifact@v6
95136
with:
96-
name: Rose-main-portable-${{ github.run_number }}
137+
name: Rose-main-classic-test-${{ github.run_number }}
97138
path: |
98139
artifacts/*.zip
99140
artifacts/*.sha256
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Rose Classic Test Package / Rose Classic 测试包
2+
================================================
3+
4+
中文说明
5+
--------
6+
7+
此压缩包是便携式测试包,不包含安装器。
8+
9+
1. 完全退出 Rose。
10+
2. 按 Win+R,输入 %LOCALAPPDATA%\Rose,然后按 Enter。
11+
3. 建议先备份该目录中现有的 classic 和 resources 文件夹。
12+
4. 将 Classic-Resources\classic 内的全部内容复制到
13+
%LOCALAPPDATA%\Rose\classic,并在提示时选择合并和覆盖文件。
14+
5. 将 Classic-Resources\resources 内的全部内容复制到
15+
%LOCALAPPDATA%\Rose\resources,并在提示时选择合并和覆盖文件。
16+
6. 从 Rose\Rose.exe 启动测试版本。
17+
18+
请勿把整个 Classic-Resources 文件夹放进 Rose 数据目录,也不要产生
19+
%LOCALAPPDATA%\Rose\classic\classic 这样的重复目录层级。
20+
21+
Classic-Resources\RESOURCE-SOURCE.txt 记录了本次打包使用的 LeagueSkins
22+
仓库地址、分支和精确提交。
23+
24+
English instructions
25+
--------------------
26+
27+
This is a portable test package. It does not contain an installer.
28+
29+
1. Exit Rose completely.
30+
2. Press Win+R, enter %LOCALAPPDATA%\Rose, and press Enter.
31+
3. Back up the existing classic and resources folders first.
32+
4. Copy everything inside Classic-Resources\classic to
33+
%LOCALAPPDATA%\Rose\classic. Merge folders and replace files when prompted.
34+
5. Copy everything inside Classic-Resources\resources to
35+
%LOCALAPPDATA%\Rose\resources. Merge folders and replace files when prompted.
36+
6. Start the test build from Rose\Rose.exe.
37+
38+
Do not copy the whole Classic-Resources folder into the Rose data directory,
39+
and do not create a nested %LOCALAPPDATA%\Rose\classic\classic directory.
40+
41+
Classic-Resources\RESOURCE-SOURCE.txt records the LeagueSkins repository,
42+
branch, and exact commit used by this package.

0 commit comments

Comments
 (0)