Bump Microsoft.Extensions.DependencyInjection from 9.0.0 to 9.0.1 #130
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
name: .NET | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
servicelocator_sln : "vb2ae.ServiceLocator.MSDependencyInjection.sln" | |
package_feed: "https://nuget.pkg.github.com/vb2ae/index.json" | |
nuget_folder: "\\packages" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Install Microsoft SBom tool | |
run: dotnet tool install --global Microsoft.Sbom.DotNetTool | |
- name: Install Nerdbank Git versioning | |
run: dotnet tool install -g nbgv | |
- name: Set Version | |
run: nbgv cloud | |
- name: Build | |
run: dotnet build --no-restore --configuration Release | |
- name: Test | |
run: dotnet test ${{env.servicelocator_sln}} --configuration Release -p:CollectCoverage=true -p:CoverletOutput=TestResults/ -p:CoverletOutputFormat=opencover --no-build --verbosity normal | |
- name: Create Test Coverage Badge | |
uses: simon-k/[email protected] | |
id: create_coverage_badge | |
with: | |
label: Unit Test Coverage | |
color: brightgreen | |
path: vb2ae.ServiceLocator.MSDependencyInjection.Tests/TestResults/coverage.opencover.xml | |
gist-filename: service-locator-code-coverage.json | |
gist-id: 066c4effbbf4ea1ea1e62f172bde53fa | |
gist-auth-token: ${{ secrets.GIST_AUTH_TOKEN }} | |
- name: Print code coverage | |
run: echo "Code coverage percentage ${{steps.create_coverage_badge.outputs.percentage}}%" | |
- name: Print badge data | |
run: echo "Badge data ${{steps.create_coverage_badge.outputs.badge}}" | |
- name: Pack Nuget | |
run: dotnet pack ${{env.servicelocator_sln}} --output ${{env.nuget_folder}} | |
- name: publish Nuget Packages to GitHub | |
run: dotnet nuget push packages/*.nupkg --source ${{env.package_feed}} --api-key ${{secrets.PUBLISH_NUGET_PACKAGE}} --skip-duplicate | |
if: github.event_name != 'pull_request' | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: published_nuget | |
path: packages/*.nupkg |