chore: bump coverlet.collector from 6.0.0 to 6.0.2 #41
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, Test & Publish | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'src/**' | |
- '.github/workflows/**' | |
branches: [ main ] | |
pull_request: | |
paths: | |
- 'src/**' | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET 6.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Change LicenseKey | |
if: github.event_name != 'pull_request' | |
working-directory: ./tests | |
run: | | |
sed -i 's/Get your own license key to run unit tests with Nager.Date/${{secrets.LICENSE_KEY}}/g' MoreDateTime.Test/AssemblyInitialize.cs | |
- name: Restore dependencies | |
working-directory: . | |
run: dotnet restore | |
- name: Build | |
working-directory: . | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
working-directory: . | |
run: | | |
dotnet test --configuration Release --no-restore --no-build --verbosity normal | |
- name: Build project and generate NuGet package | |
run: | | |
dotnet pack --configuration Release --output $GITHUB_WORKSPACE/out src/MoreDateTime/MoreDateTime.csproj | |
- name: Push NuGet package | |
if: github.event_name != 'pull_request' | |
run: | | |
cd $GITHUB_WORKSPACE/out | |
dotnet nuget push *.nupkg --source https://www.nuget.org/api/v2/package --api-key ${{secrets.NUGET_TOKEN}} --skip-duplicate --no-symbols | |
- name: Push Github package | |
if: github.event_name != 'pull_request' | |
run: | | |
cd $GITHUB_WORKSPACE/out | |
dotnet nuget add source --username Hefaistos68 --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Hefaistos68/index.json" |