Skip to content

Bump Microsoft.Extensions.Configuration.Binder and Microsoft.Extensions.Hosting #383

Bump Microsoft.Extensions.Configuration.Binder and Microsoft.Extensions.Hosting

Bump Microsoft.Extensions.Configuration.Binder and Microsoft.Extensions.Hosting #383

Workflow file for this run

name: Build and Publish
on:
push:
branches:
- "main"
pull_request_target:
branches:
- "main"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
dotnet-version: 9.x
source-url: https://nuget.pkg.github.com/AndrewMcLachlan/index.json
- name: Set version number
id: set-version-number
uses: andrewmclachlan/actions/set-version-number@v2
with:
project: 'src/Asm'
versionPropertyName: 'Version'
- name: Restore
run: dotnet restore Asm.sln
- name: Build
run: dotnet build Asm.sln --no-restore --configuration Release
- name: Test
run: dotnet test Asm.sln --no-restore --no-build --filter 'Category=Unit&FullyQualifiedName!~Testing&FullyQualifiedName!~Win32' --verbosity normal --collect:"XPlat Code Coverage" --results-directory:./testresults --configuration Release
- name: Package
run: dotnet pack Asm.sln --no-restore --no-build -o ${{ github.workspace }}/publish --configuration Release --p:Version=${{ steps.set-version-number.outputs.version }} --p:FileVersion=${{ steps.set-version-number.outputs.version }}
- name: Code Coverage Report
uses: irongut/[email protected]
with:
filename: testresults/**/coverage.cobertura.xml
badge: true
fail_below_min: false
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '50 70'
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target')
with:
recreate: true
path: code-coverage-results.md
- name: Publish Packages
if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target' && github.ref == 'refs/heads/main')
run: dotnet nuget push ${{ github.workspace }}/publish/**/*.nupkg