Skip to content

Commit f8d53fb

Browse files
committed
Update dotnet-aot-check.yaml
1 parent bdf1718 commit f8d53fb

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/dotnet-aot-check.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: dotnet-aot-check
22

3-
on: [pull_request, push]
3+
on:
4+
pull_request:
5+
push:
46

57
jobs:
68
aot-compile-check:
@@ -11,19 +13,19 @@ jobs:
1113
runtime: [win-x64, linux-x64]
1214

1315
steps:
14-
- uses: actions/checkout@v4
16+
- name: Checkout code
17+
uses: actions/checkout@v4
1518

16-
- name: Setup .NET SDK(多版本)
19+
- name: Setup .NET SDK
1720
uses: actions/setup-dotnet@v4
1821
with:
19-
# 关键:数组项必须比 dotnet-version: 多缩进 2 个空格(仅用空格,禁止Tab)
2022
dotnet-version:
21-
- '8.0.x'
23+
- '8.0.x' # 这一行是第27行(对应你的报错行),重点检查缩进!
2224

2325
- name: Restore dependencies
2426
run: dotnet restore ./src/c#/GeneralUpdate.sln
2527

26-
- name: Check AOT compilation(指定 net8.0 框架)
28+
- name: Check AOT compilation
2729
shell: ${{ matrix.os == 'windows-latest' ? 'pwsh' : 'bash' }}
2830
run: |
2931
dotnet publish ./src/c#/GeneralUpdate.Client/GeneralUpdate.Client.csproj \
@@ -41,8 +43,8 @@ jobs:
4143
run: |
4244
$publishDir = "./src/c#/GeneralUpdate.Client/bin/Release/net8.0/${{ matrix.runtime }}/publish"
4345
if ($env:RUNNER_OS -eq "Windows" -and -not (Test-Path "$publishDir/GeneralUpdate.Client.exe")) {
44-
throw "AOT compiled executable not found for Windows: $publishDir/GeneralUpdate.Client.exe"
46+
throw "AOT executable not found for Windows: $publishDir/GeneralUpdate.Client.exe"
4547
}
4648
if ($env:RUNNER_OS -eq "Linux" -and -not (Test-Path "$publishDir/GeneralUpdate.Client")) {
47-
throw "AOT compiled executable not found for Linux: $publishDir/GeneralUpdate.Client"
49+
throw "AOT executable not found for Linux: $publishDir/GeneralUpdate.Client"
4850
}

0 commit comments

Comments
 (0)