Skip to content

Fix workflow branch configuration to enable CI on pull requests #5

Fix workflow branch configuration to enable CI on pull requests

Fix workflow branch configuration to enable CI on pull requests #5

Workflow file for this run

name: .NET Core
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal --logger "trx;LogFileName=test-results.trx"
- name: Publish Test Results
uses: dorny/test-reporter@v1
if: always()
with:
name: Test Results
path: '**/test-results.trx'
reporter: dotnet-trx
- name: Publish NuGet Package
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: DoubleLinkedDirectedGraph/DoubleLinkedDirectedGraph.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}