Add more TcpClientConfig options #59
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: Build, Test & Publish | |
on: | |
push: | |
paths: | |
- 'src/**' | |
- '.github/workflows/**' | |
branches: [ main ] | |
pull_request: | |
paths: | |
- 'src/**' | |
branches: [ main ] | |
#permissions: | |
# statuses: write | |
# checks: write | |
# contents: write | |
# pull-requests: write | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core 3.1 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 3.1.x | |
- name: Setup .NET 8 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
working-directory: ./src | |
run: dotnet restore | |
- name: Build | |
working-directory: ./src | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
working-directory: ./src | |
run: | | |
dotnet test --configuration Release --no-restore --no-build --verbosity normal --logger trx || true | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: always() | |
with: | |
name: 'DotNET Tests ${{ matrix.os }}' | |
path: "**/*.trx" | |
reporter: dotnet-trx | |
fail-on-error: true | |
- name: Build project and generate NuGet package | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
dotnet pack --configuration Release --output $GITHUB_WORKSPACE/out src/Nager.TcpClient/Nager.TcpClient.csproj | |
- name: Push NuGet package | |
if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest' | |
run: | | |
cd $GITHUB_WORKSPACE/out | |
dotnet nuget push *.nupkg --source https://www.nuget.org/api/v2/package --api-key ${{secrets.NUGET_TOKEN}} --skip-duplicate --no-symbols |