From 04c0d1545205337ca66a8020a688050cccb6b929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=88=B0=E9=98=9F=E7=9A=84=E5=81=B6=E5=83=8F-=E5=B2=9B?= =?UTF-8?q?=E9=A3=8E=E9=85=B1!?= Date: Tue, 28 Nov 2023 15:17:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20CI=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 舰队的偶像-岛风酱! --- .github/workflows/build.yml | 77 ++----------------------------------- 1 file changed, 4 insertions(+), 73 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d575ceb..a48e21f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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