refactor(ci): 重构构建配置和CI工作流

统一项目构建输出路径结构,移除冗余的x86 Debug配置
简化CI工作流中的artifact上传逻辑,支持多架构构建
更新PR检查工作流名称以更准确反映其用途

Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>
This commit is contained in:
doudou0720
2026-03-28 21:35:24 +08:00
parent 759a635026
commit 04806d2004
5 changed files with 23 additions and 62 deletions
+5 -12
View File
@@ -46,7 +46,7 @@ jobs:
- name: Check if exe file is generated
id: check-exe
run: |
$exePath = "Ink Canvas\bin\Debug\net472\InkCanvasForClass.exe"
$exePath = "Ink Canvas\bin\Debug\${{ matrix.architecture }}\net472\InkCanvasForClass.exe"
if (Test-Path $exePath) {
echo "build_success=true" >> $env:GITHUB_OUTPUT
@@ -69,19 +69,12 @@ jobs:
$version = "debug-$shortSha-$env:GITHUB_RUN_NUMBER"
echo "archive_name=$version" >> $env:GITHUB_OUTPUT
- name: Upload Artifact(AnyCPU) (if build succeeded)
if: steps.check-exe.outputs.build_success == 'true' && matrix.architecture == 'AnyCPU'
- name: Upload Artifact (if build succeeded)
if: steps.check-exe.outputs.build_success == 'true'
uses: actions/upload-artifact@v7
with:
name: InkCanvasForClass.CE.debug
path: "Ink Canvas/bin/Debug/net472/*"
- name: Upload Artifact(x86) (if build succeeded)
if: steps.check-exe.outputs.build_success == 'true' && matrix.architecture == 'x86'
uses: actions/upload-artifact@v7
with:
name: InkCanvasForClass.CE.debug.x86
path: "Ink Canvas/bin/x86 Debug/net472/*"
name: InkCanvasForClass.CE.debug.${{ matrix.architecture }}
path: "Ink Canvas/bin/Debug/${{ matrix.architecture }}/net472/*"
- name: Create Summary
if: always()
+6 -12
View File
@@ -1,4 +1,4 @@
name: .NET Build & Package
name: PR Check
on:
pull_request:
@@ -43,7 +43,7 @@ jobs:
- name: Check if exe file is generated
id: check-exe
run: |
$exePath = "Ink Canvas\bin\Debug\net472\InkCanvasForClass.exe"
$exePath = "Ink Canvas\bin\Debug\${{ matrix.architecture }}\net472\InkCanvasForClass.exe"
if (Test-Path $exePath) {
echo "build_success=true" >> $env:GITHUB_OUTPUT
@@ -66,19 +66,13 @@ jobs:
$version = "debug-$shortSha-$env:GITHUB_RUN_NUMBER"
echo "archive_name=$version" >> $env:GITHUB_OUTPUT
- name: Upload Artifact(AnyCPU) (if build succeeded)
if: steps.check-exe.outputs.build_success == 'true' && matrix.architecture == 'AnyCPU'
- name: Upload Artifact (if build succeeded)
if: steps.check-exe.outputs.build_success == 'true'
uses: actions/upload-artifact@v7
with:
name: InkCanvasForClass.CE.debug
path: "Ink Canvas/bin/Debug/net472/*"
name: InkCanvasForClass.CE.debug.${{ matrix.architecture }}
path: "Ink Canvas/bin/Debug/${{ matrix.architecture }}/net472/*"
- name: Upload Artifact(x86) (if build succeeded)
if: steps.check-exe.outputs.build_success == 'true' && matrix.architecture == 'x86'
uses: actions/upload-artifact@v7
with:
name: InkCanvasForClass.CE.debug.x86
path: "Ink Canvas/bin/x86 Debug/net472/*"
- name: Create Summary
if: always()