Skip to content

Re-introduced WriteTo method accepting api key and log id as strings … #38

Re-introduced WriteTo method accepting api key and log id as strings …

Re-introduced WriteTo method accepting api key and log id as strings … #38

Workflow file for this run

name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
6.0.x
7.0.x
- name: Remove ASP.NET sample
run: dotnet sln serilog-sinks-elmahio.sln remove examples\Serilog.Sinks.ElmahIo.AspNet\Serilog.Sinks.ElmahIo.AspNet.csproj
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Pack
run: dotnet pack --configuration Release src/Serilog.Sinks.ElmahIo/Serilog.Sinks.ElmahIo.csproj /p:Version=5.0.${{ github.run_number }}
- name: Install dotnet-validate
run: dotnet tool install --global dotnet-validate --version 0.0.1-preview.304
- name: Validate
run: dotnet validate package local src/Serilog.Sinks.ElmahIO/bin/Release/Serilog.Sinks.ElmahIo.5.0.${{ github.run_number }}.nupkg
- name: Push
run: dotnet nuget push src/Serilog.Sinks.ElmahIo/bin/Release/Serilog.Sinks.ElmahIo.5.0.${{ github.run_number }}.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
if: ${{ github.event_name == 'push' }}