From 3d3e2097cc891443801918068b10978b19bea37c Mon Sep 17 00:00:00 2001 From: Serge K Date: Sun, 23 Jun 2024 23:11:31 +0700 Subject: [PATCH] ci: build & pack --- .github/workflows/ci.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6724b6f..0314a5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,24 +12,30 @@ on: workflow_dispatch: jobs: - build: - name: Build - runs-on: ubuntu-22.04 + build-windows: + name: Build, Test & Pack (Windows) + runs-on: windows-2022 steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup .NET - uses: actions/setup-dotnet@v4 - - name: Restore run: dotnet restore - name: Build run: dotnet build --no-restore -c Release -p:ContinuousIntegrationBuild=true + - name: Run tests + run: dotnet test --no-build -c Release -e:CoverletOutputFormat=opencover + + - name: Publish to Codecov + uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + - name: Set Dev version if: github.ref == 'refs/heads/main' run: | @@ -56,9 +62,9 @@ jobs: github: name: Deploy to GitHub - needs: [build] + needs: [build-windows] if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Download artifacts uses: actions/download-artifact@v4 @@ -69,9 +75,9 @@ jobs: nuget: name: Deploy to NuGet - needs: [build] + needs: [build-windows] if: startsWith(github.ref, 'refs/tags/v') - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Download artifacts uses: actions/download-artifact@v4