Skip to content

Commit

Permalink
修复 CI 错误
Browse files Browse the repository at this point in the history
Signed-off-by: 舰队的偶像-岛风酱! <frg2089@outlook.com>
  • Loading branch information
frg2089 committed May 23, 2024
1 parent 50ee6a9 commit 04c0d15
Showing 1 changed file with 4 additions and 73 deletions.
77 changes: 4 additions & 73 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,51 +26,6 @@ on:
- "test/**/*"

jobs:
build-sdk:
name: 构建 MSBuild Sdk
runs-on: ubuntu-latest
steps:
- name: 签出仓库
uses: actions/checkout@v4
with:
lfs: true

- name: 配置 Nuget 缓存
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: nuget-cache
restore-keys: |
nuget-cache
- name: 配置 .Net 环境
uses: actions/setup-dotnet@v3.2.0
with:
global-json-file: ./global.json

- name: 还原
shell: pwsh
run: |-
dotnet restore
- name: 构建
shell: pwsh
run: |-
dotnet build --configuration Release --no-restore
- name: 打包
shell: pwsh
run: |-
dotnet pack --configuration Release --no-restore --no-build --include-symbols --include-source
- name: 上传 Nuget 包
uses: actions/upload-artifact@v3.1.3
with:
name: nuget-packages-sdk
path: |
sdk/**/bin/Release/*.*nupkg
retention-days: 3

build-dotnet:
strategy:
fail-fast: false
Expand Down Expand Up @@ -100,45 +55,21 @@ jobs:
with:
global-json-file: ./global.json

- name: 生成解决方案
shell: pwsh
run: ./script/Generate-Solutions.ps1

- name: 还原
shell: pwsh
run: |-
. ./script/Invoke-AllSolutions.ps1
Invoke-AllProject {
dotnet restore $args | Out-Default
return $LASTEXITCODE
} -Echo "Restore ""{0}"""
run: dotnet restore

- name: 构建
shell: pwsh
run: |-
. ./script/Invoke-AllSolutions.ps1
Invoke-AllProject {
dotnet build $args --configuration Release --no-restore | Out-Default
return $LASTEXITCODE
} -Echo "Build ""{0}"""
run: dotnet build --configuration Release --no-restore

- name: 测试
shell: pwsh
run: |-
. ./script/Invoke-AllSolutions.ps1
Invoke-AllProject {
dotnet test $args --configuration Release --no-build | Out-Default
return $LASTEXITCODE
} -Echo "Test ""{0}"""
run: dotnet test --configuration Release --no-build

- name: 打包
shell: pwsh
run: |-
. ./script/Invoke-AllSolutions.ps1
Invoke-AllProject {
dotnet pack $args --configuration Release --no-restore --no-build --include-symbols --include-source | Out-Default
return $LASTEXITCODE
} -Echo "Pack ""{0}"""
run: dotnet pack --configuration Release --no-restore --no-build --include-symbols --include-source

- name: 上传 Nuget 包
uses: actions/upload-artifact@v3.1.3
Expand Down

0 comments on commit 04c0d15

Please sign in to comment.