From 51675db3947728c05da5b8513dbcecbba9ff1538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=97=E6=88=90=F0=9F=8D=A5?= Date: Wed, 16 Sep 2026 22:24:57 +0800 Subject: [PATCH] Update dotnet.yml --- .github/workflows/dotnet.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 217f7cb..96ebf5d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,5 +1,4 @@ -# This workflow will build a .NET project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net +# This workflow will build and publish a .NET project name: .NET @@ -11,18 +10,32 @@ on: jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 + - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x + - name: Restore dependencies run: dotnet restore + - name: Build - run: dotnet build --no-restore + run: dotnet build --no-restore --configuration Release + - name: Test - run: dotnet test --no-build --verbosity normal + run: dotnet test --no-build --configuration Release --verbosity normal + + - name: Publish + run: dotnet publish --configuration Release --output ./publish + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: VHDPatchFix + path: ./publish + if-no-files-found: error