Skip to content

Commit c52882d

Browse files
committed
Merge remote-tracking branch 'upstream/main' into pr/BoredYukolin/5912
2 parents dddbdbf + c22d39b commit c52882d

File tree

179 files changed

+11963
-1644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+11963
-1644
lines changed

.github/workflows/packer.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'src/**'
99
- 'config/packer/**'
1010
- 'projects/**'
11+
- '.github/workflows/packer.yml'
1112

1213

1314
jobs:
@@ -28,14 +29,15 @@ jobs:
2829
with:
2930
key: ${{ runner.os }}-Packer-${{ hashFiles('src/Packer/**') }}
3031
path: |
31-
Packer.exe
32-
git2-*.dll
32+
build/Packer.exe
33+
build/git2-*.dll
3334
lookup-only: true
3435

3536
# 构造程序
3637
- name: Build Packer if not cached
3738
if: steps.cache-packer.outputs.cache-hit != 'true'
38-
run: dotnet publish .\src\Packer\Packer.csproj -o ./ -r win-x64
39+
# dotnet/sdk#51806 Console Projects fail to compile with <ArtifactsPath>$(MSBuildThisFileDirectory)
40+
run: dotnet publish .\src\Packer\Packer.csproj -o ./build -r win-x64
3941

4042
build-uploader:
4143
if: github.repository == 'CFPAOrg/Minecraft-Mod-Language-Package'
@@ -54,13 +56,14 @@ jobs:
5456
uses: actions/cache@v4
5557
with:
5658
key: ${{ runner.os }}-Uploader-${{ hashFiles('src/Uploader/**') }}
57-
path: Uploader.exe
59+
path: build/Uploader.exe
5860
lookup-only: true
5961

6062
# 构造程序
6163
- name: Build Uploader if not cached
6264
if: steps.cache-uploader.outputs.cache-hit != 'true'
63-
run: dotnet publish .\src\Uploader\Uploader.csproj -o ./ -r win-x64
65+
# dotnet/sdk#51806 Console Projects fail to compile with <ArtifactsPath>$(MSBuildThisFileDirectory)
66+
run: dotnet publish .\src\Uploader\Uploader.csproj -o ./build -r win-x64
6467

6568
pack:
6669
name: Pack Resources and Upload Artifacts/Releases
@@ -84,16 +87,21 @@ jobs:
8487
with:
8588
key: ${{ runner.os }}-Packer-${{ hashFiles('src/Packer/**') }}
8689
path: |
87-
Packer.exe
88-
git2-*.dll
90+
build/Packer.exe
91+
build/git2-*.dll
8992
fail-on-cache-miss: true # 应由前序保证
9093

94+
# dotnet/sdk#51806 Console Projects fail to compile with <ArtifactsPath>$(MSBuildThisFileDirectory)
95+
- run: mv ./build/* .
96+
shell: bash
97+
9198
- name: Check changed path on ${{ matrix.version }}
9299
uses: MarceloPrado/has-changed-path@v1.0
93100
id: check-changes
94101
with:
95102
# 判断位置:该版本文件、该版本配置、代码
96103
paths: >
104+
.github/workflows/packer.yml
97105
projects/${{ matrix.version }}
98106
config/packer/${{ matrix.version }}.json
99107
src/**
@@ -133,9 +141,13 @@ jobs:
133141
with:
134142
key: ${{ runner.os }}-Uploader-${{ hashFiles('src/Uploader/**') }}
135143
path: |
136-
Uploader.exe
144+
build/Uploader.exe
137145
fail-on-cache-miss: true # 应由前序保证
138146

147+
# dotnet/sdk#51806 Console Projects fail to compile with <ArtifactsPath>$(MSBuildThisFileDirectory)
148+
- run: mv ./build/* .
149+
shell: bash
150+
139151
# 还原artifact(资源包)
140152
- name: Restore Artifacts
141153
uses: actions/download-artifact@v4

.github/workflows/pr-packer.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ jobs:
3232
with:
3333
key: ${{ runner.os }}-Packer-${{ hashFiles('src/Packer/**') }}
3434
path: |
35-
Packer.exe
36-
git2-*.dll
35+
build/Packer.exe
36+
build/git2-*.dll
3737
lookup-only: true
3838

3939
# 构造程序
4040
- name: Build Packer if not cached
4141
if: steps.cache-packer.outputs.cache-hit != 'true'
42-
run: dotnet publish .\src\Packer\Packer.csproj -o ./ -r win-x64
42+
# dotnet/sdk#51806 Console Projects fail to compile with <ArtifactsPath>$(MSBuildThisFileDirectory)
43+
run: dotnet publish .\src\Packer\Packer.csproj -o ./build -r win-x64
4344

4445

4546
pack:
@@ -66,16 +67,21 @@ jobs:
6667
with:
6768
key: ${{ runner.os }}-Packer-${{ hashFiles('src/Packer/**') }}
6869
path: |
69-
Packer.exe
70-
git2-*.dll
70+
build/Packer.exe
71+
build/git2-*.dll
7172
fail-on-cache-miss: true # 前一步理应构造过的。如果不命中,肯定有问题,不如直接挂掉。
73+
74+
# dotnet/sdk#51806 Console Projects fail to compile with <ArtifactsPath>$(MSBuildThisFileDirectory)
75+
- run: mv ./build/* .
76+
shell: bash
7277

7378
- name: Check changed path on ${{ matrix.version }}
7479
uses: MarceloPrado/has-changed-path@v1.0
7580
id: check-changes
7681
with:
77-
# 判断位置:该版本文件、该版本配置、代码
82+
# 判断位置:action配置、该版本文件、该版本配置、代码
7883
paths: >
84+
.github/workflows/pr-packer.yml
7985
projects/${{ matrix.version }}/**
8086
config/packer/${{ matrix.version }}.json
8187
src/**
@@ -84,8 +90,9 @@ jobs:
8490
uses: MarceloPrado/has-changed-path@v1.0
8591
id: check-critical-changes
8692
with:
87-
# 判断位置:该版本配置、代码
93+
# 判断位置:action配置、该版本配置、代码
8894
paths: >
95+
.github/workflows/pr-packer.yml
8996
config/packer/${{ matrix.version }}.json
9097
src/**
9198

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# CFPA-specifics
22
Minecraft-Mod-Language-Package-*.zip
33
*.md5
4+
build/
45
Packer.exe
56
Packer.xml
67

Packer-Doc.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@
200200
-`parameter` 中,有时会出现多于一组参数;这种情况下,每组参数都会自由组合。
201201
- 同样的,`templates` 也会和每一套参数自由组合。
202202
- 将所有组合后的条目汇总,生成语言文件。
203-
- 在这一过程中,如果出现了**键冲突**,目前而言,**打包器会在此崩溃!** 不过,如果后续观察表明确实存在此种需要,也会考虑修改这一行为。
204203

205204
组合文件可以和其他打包策略混合使用,以修改组合中效果不好的部分,或者添加非组合的内容。
206205

0 commit comments

Comments
 (0)