Bump coverlet.collector from 6.0.1 to 6.0.2 #47
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
name: Build and Publish | |
on: | |
push: | |
# branches: | |
# - main | |
tags: | |
- '*' | |
paths-ignore: | |
- README.md | |
- LICENSE | |
- CHANGELOG.md | |
- docs/** | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- README.md | |
- LICENSE | |
- CHANGELOG.md | |
- docs/** | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
env: | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Required for GitVersion | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v1 | |
with: | |
versionSpec: '5.x' | |
- name: Determine Version | |
uses: gittools/actions/gitversion/execute@v1 | |
id: gitversion | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '7.x' | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: > | |
dotnet build | |
--configuration Release | |
--no-restore | |
-p:VersionPrefix=${{ steps.gitversion.outputs.nuGetVersion }} | |
- name: Test | |
run: > | |
dotnet test | |
--configuration Release | |
--no-restore | |
--verbosity normal | |
--collect "Code coverage" | |
- name: Pack | |
run: > | |
dotnet pack | |
--configuration Release | |
--no-build | |
--output ${{ github.workspace }}/drop | |
-p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }} | |
- name: Publish Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ github.workspace }}/drop/* | |
name: drop | |
Publish: | |
runs-on: ubuntu-latest | |
needs: [ Build ] | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Setup .NET 6 SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '7.x' | |
source-url: https://api.nuget.org/v3/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }} | |
- name: Download Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: drop | |
path: drop | |
- name: Publish to NuGet.org | |
run: > | |
dotnet nuget push "$GITHUB_WORKSPACE/drop/*" | |
-k ${{ secrets.NUGET_API_KEY }} | |
--skip-duplicate |