name: Detection-CI

on: [push]

jobs:
  build:

    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v2
    - name: Setup .NET Core
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 3.1.101
    - name: Restore with dotnet
      run: dotnet restore
    - name: Build with dotnet
      run: dotnet build --configuration Release
    - name: Test with dotnet
      run: dotnet test
    - name: Pack with dotnet
      run: dotnet pack --configuration Release --output .\artifacts

name: Detection-CI

on:
  pull_request:
  push:
    branches:
      - dev
      - master
      - releases/*
      - features/*

jobs:
  build:

    runs-on: ${{ matrix.operating-system }}
    strategy:
      matrix:
        operating-system: [ubuntu-latest, windows-latest, macOS-latest]

    steps:
    - uses: actions/checkout@v2
    - name: Setup .NET Core
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 3.1.101
    - name: Restore with dotnet
      run: dotnet restore
    - name: Build with dotnet
      run: dotnet build --configuration Release
    - name: Test with dotnet
      run: dotnet test
    - name: Pack with dotnet
      run: dotnet pack --configuration Release
    - name: Publish with dotnet to GibHub
      run: dotnet nuget push **/*.nupkg

Build CI on Windows, Ubuntu, macOS
Build CI on Windows, Ubuntu, macOS

Build only if pull request and main branches.
