Enable performance analysis rules #21
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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: Build System.Text.Json Serialization | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'typeid-textjson-v*' | |
paths: | |
- 'src/FastIDs.TypeId.Serialization/**' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'src/FastIDs.TypeId.Serialization/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./src/FastIDs.TypeId.Serialization | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore ./TypeId.Serialization.SystemTextJson/TypeId.Serialization.SystemTextJson.csproj | |
- name: Build | |
run: dotnet build --no-restore --configuration Release ./TypeId.Serialization.SystemTextJson/TypeId.Serialization.SystemTextJson.csproj | |
- name: Test | |
run: dotnet test --configuration Release ./TypeId.Serialization.SystemTextJson.Tests/TypeId.Serialization.SystemTextJson.Tests.csproj | |
- name: Publish to NuGet | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
dotnet pack --no-build -c Release ./TypeId.Serialization.SystemTextJson -o . | |
dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate |