Skip to content

Commit

Permalink
ci: build & pack
Browse files Browse the repository at this point in the history
  • Loading branch information
phnx47 committed Jun 23, 2024
1 parent 9a5f718 commit 3d3e209
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 3d3e209

Please sign in to comment.