Skip to content

Handle IsNullOrWhiteSpace extension method calls #19

Handle IsNullOrWhiteSpace extension method calls

Handle IsNullOrWhiteSpace extension method calls #19

Workflow file for this run

name: Build and Test
on:
push:
branches: [ main ]
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
pull_request:
branches: [ main ]
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
9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Get version from tag
if: startsWith(github.ref, 'refs/tags/')
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Build Release configuration
if: startsWith(github.ref, 'refs/tags/')
run: dotnet build --configuration Release /p:Version=${{ steps.get_version.outputs.VERSION }} --no-restore
- name: Pack
if: startsWith(github.ref, 'refs/tags/')
run: dotnet pack --no-build --configuration Release /p:Version=${{ steps.get_version.outputs.VERSION }} --output ./nupkgs
- name: Publish to NuGet
if: startsWith(github.ref, 'refs/tags/')
run: |
dotnet nuget push "./nupkgs/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate