v1.0.4 #11
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: .NET Core CI | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to build' | |
required: true | |
default: '1.0.3' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.100 | |
- name: Install dependencies - Serilog.Sinks.SentrySDK | |
run: dotnet restore src/Serilog.Sinks.SentrySDK/Serilog.Sinks.SentrySDK.csproj | |
- name: Install dependencies - Serilog.Sinks.SentrySDK.AspNetCore | |
run: dotnet restore src/Serilog.Sinks.SentrySDK.AspNetCore/Serilog.Sinks.SentrySDK.AspNetCore.csproj | |
- name: Build - Serilog.Sinks.SentrySDK | |
run: | | |
dotnet build src/Serilog.Sinks.SentrySDK/Serilog.Sinks.SentrySDK.csproj --configuration Release | |
- name: Build - Serilog.Sinks.SentrySDK.AspNetCore | |
run: | | |
dotnet build src/Serilog.Sinks.SentrySDK.AspNetCore/Serilog.Sinks.SentrySDK.AspNetCore.csproj --configuration Release | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.100 | |
- name: Test - Serilog.Sinks.SentrySDK.AspNetCore.Tests | |
run: dotnet test --no-restore --verbosity normal src/Serilog.Sinks.SentrySDK.AspNetCore.Tests/Serilog.Sinks.SentrySDK.AspNetCore.Tests.csproj | |
- name: Test - Serilog.Sinks.SentrySDK.Tests | |
run: dotnet test --no-restore --verbosity normal src/Serilog.Sinks.SentrySDK.Tests/Serilog.Sinks.SentrySDK.Tests.csproj | |
package: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.100 | |
- name: Pack Serilog.Sinks.SentrySDK | |
run: dotnet pack src/Serilog.Sinks.SentrySDK/Serilog.Sinks.SentrySDK.csproj --configuration Release --output ./nupkgs | |
- name: Pack Serilog.Sinks.SentrySDK.AspNetCore | |
run: dotnet pack src/Serilog.Sinks.SentrySDK.AspNetCore/Serilog.Sinks.SentrySDK.AspNetCore.csproj --configuration Release --output ./nupkgs | |
- name: Check nupkgs directory | |
run: | | |
ls ./nupkgs | |
- name: Upload NuGet packages | |
uses: actions/upload-artifact@v2 | |
with: | |
name: nuget-packages | |
path: ./nupkgs/*.nupkg | |
push: | |
needs: package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.100 | |
- name: Download NuGet packages | |
uses: actions/download-artifact@v2 | |
with: | |
name: nuget-packages | |
path: ./nupkgs | |
- name: Push Serilog.Sinks.SentrySDK to NuGet | |
run: dotnet nuget push ./nupkgs/Serilog.Sinks.SentrySDK.*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate | |
- name: Push Serilog.Sinks.SentrySDK.AspNetCore to NuGet | |
run: dotnet nuget push ./nupkgs/Serilog.Sinks.SentrySDK.AspNetCore.*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate |