Skip to content

Optional.NewtonsoftJson-1.2.1 #2

Optional.NewtonsoftJson-1.2.1

Optional.NewtonsoftJson-1.2.1 #2

name: Optional NewtonsoftJson
on:
push:
tags:
- 'Optional.NewtonsoftJson-*'
env:
Project: src/Optional.NewtonsoftJson
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
source-url: https://nuget.pkg.github.com/deskdirector/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build ${{ env.Project }} --configuration Release --no-restore
- name: Test
run: |
dotnet test "tests/Optional.Tests/Optional.Tests.csproj" --configuration Release --no-restore --verbosity normal
dotnet test "tests/Optional.NewtonsoftJson.Tests/Optional.NewtonsoftJson.Tests.csproj" --configuration Release --no-restore --verbosity normal
- name: Publish to GPR
run: dotnet nuget push "${{ env.Project }}/bin/Release/*.symbols.nupkg"