Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,22 @@ env:
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7.0.0

- name: Setup .NET SDK
uses: actions/setup-dotnet@v5.4.0
with:
dotnet-version: ${{ vars.DOTNET_SDK_VERSIONS }}
dotnet-version: |
10.x
9.x
8.x
cache: true
cache-dependency-path: Directory.Packages.props

- name: Restore .NET tools
run: dotnet tool restore
- name: Restore NuGet packages
run: dotnet restore
29 changes: 16 additions & 13 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v7.0.0
- name: Setup .NET SDK # detected from global.json
- name: Setup .NET SDK # detect version from global.json
uses: actions/setup-dotnet@v5.4.0
- name: Restore .NET tools
run: dotnet tool restore

- name: Lint with dotnet-format
run: |
dotnet format style --verify-no-changes --verbosity detailed
dotnet format analyzers --verify-no-changes --verbosity detailed

- name: Format Check with csharpier
run: dotnet csharpier check . --log-format msbuild
- parallel:
- name: Lint with dotnet-format (style)
run: dotnet format style --verify-no-changes --verbosity detailed
- name: Lint with dotnet-format (analyzers)
run: dotnet format analyzers --verify-no-changes --verbosity detailed
- name: Format Check with csharpier
run: dotnet csharpier check . --log-format msbuild

test:
name: Debug Build & Test
Expand All @@ -57,14 +57,17 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5.4.0
with:
dotnet-version: ${{ vars.DOTNET_SDK_VERSIONS }}
dotnet-version: |
10.x
9.x
8.x
cache: true
cache-dependency-path: Directory.Packages.props

- name: Build
run: dotnet build
- name: Test
run: dotnet test --no-build --coverage --coverage-output-format cobertura --coverage-output "${{ vars.COVERAGE_REPORT_FILE }}"
run: dotnet test --no-build --coverage --coverage-output-format cobertura --coverage-output "coverage.cobertura.xml"

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7.0.0
Expand All @@ -74,6 +77,6 @@ jobs:
flags: ${{ runner.os }},${{ runner.arch }}
disable_search: true
files: |
${{ format(vars.TEST_ASSET_FOLDERS, 'net10.0', vars.COVERAGE_REPORT_FILE) }},
${{ format(vars.TEST_ASSET_FOLDERS, 'net9.0', vars.COVERAGE_REPORT_FILE) }},
${{ format(vars.TEST_ASSET_FOLDERS, 'net8.0', vars.COVERAGE_REPORT_FILE) }}
${{ format(vars.TEST_ASSET_FOLDERS, 'net10.0', 'coverage.cobertura.xml') }},
${{ format(vars.TEST_ASSET_FOLDERS, 'net9.0', 'coverage.cobertura.xml') }},
${{ format(vars.TEST_ASSET_FOLDERS, 'net8.0', 'coverage.cobertura.xml') }}
37 changes: 19 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,34 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5.4.0
with:
dotnet-version: ${{ vars.DOTNET_SDK_VERSIONS }}
dotnet-version: |
10.x
9.x
8.x
cache: true
cache-dependency-path: Directory.Packages.props

- name: Login to NuGet (with OIDC)
uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 #v1.2.0
uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
id: login
with:
user: ${{ vars.NUGET_USER_NAME }}

- name: Restore
run: dotnet restore --locked-mode
- name: Release Build & Pack
run: dotnet pack --configuration Release --no-restore --output nupkgs -p:Version=${TAG_VERSION:1}
run: dotnet pack --configuration Release --output nupkgs -p:Version=${TAG_VERSION:1}
env:
TAG_VERSION: ${{ github.event.release.tag_name }} # v0.0.0-abc

- name: Generate Attestation for packages
uses: actions/attest@v4.1.1
with:
subject-path: "nupkgs/*.nupkg"

- name: Publish to NuGet
run: dotnet nuget push "nupkgs/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ steps.login.outputs.NUGET_API_KEY }}
- name: Upload Packages
uses: actions/upload-artifact@v7.0.1
with:
name: packages
path: nupkgs/
include-hidden-files: true
- parallel:
- name: Generate Attestation for packages
uses: actions/attest@v4.1.1
with:
subject-path: "nupkgs/*.nupkg"
- name: Publish to NuGet
run: dotnet nuget push "nupkgs/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ steps.login.outputs.NUGET_API_KEY }}
- name: Upload Packages
uses: actions/upload-artifact@v7.0.1
with:
name: packages
path: nupkgs/
include-hidden-files: true
Loading