name: Build

on:
  - create
  - pull_request
  - push

jobs:
  build:
    name: Build-${{matrix.os}}
    runs-on: ${{matrix.os}}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]
    steps:
    - uses: actions/checkout@v1
    - name: 'Install .NET Core SDK'
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 3.1.100
    - name: 'Install Cake Tool'
      run: 'dotnet tool install --global Cake.Tool'
      shell: pwsh
      #failOnStderr: true $ErrorActionPreference = 'stop'
    - name: 'Dotnet Cake Build'
      run: 'dotnet cake --target=Build'
      shell: pwsh
      #failOnStderr: true
    - name: 'Dotnet Cake Test'
      run: 'dotnet cake --target=Test'
      shell: pwsh
      #failOnStderr: true
    - name: 'Dotnet Cake Pack'
      run: 'dotnet cake --target=Pack'
      shell: pwsh
      #failOnStderr: true
    #- task: PublishTestResults@2
    #  displayName: 'Publish Test Results'
    #  inputs:
    #    testResultsFormat: 'VSTest'
    #    testResultsFiles: '**/*.trx'
    #- publish: './Artefacts'
    #  artifact: $(matrixName)
    #  displayName: 'Publish Artefacts'

name: Build

on:
  - create
  - pull_request
  - push
    
env:
  # Set the DOTNET_SKIP_FIRST_TIME_EXPERIENCE environment variable to stop wasting time caching packages
  DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
  # Disable sending usage data to Microsoft
  DOTNET_CLI_TELEMETRY_OPTOUT: true

jobs:
  build:
    name: Build-${{matrix.os}}
    runs-on: ${{matrix.os}}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]
    steps:
    - uses: actions/checkout@v1
    - name: 'Install .NET Core SDK'
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 3.1.100
    - name: 'Install Cake Tool'
      run: 'dotnet tool install --global Cake.Tool'
      shell: pwsh
      #failOnStderr: true $ErrorActionPreference = 'stop'
    - name: 'Dotnet Cake Build'
      run: 'dotnet cake --target=Build'
      shell: pwsh
      #failOnStderr: true
    - name: 'Dotnet Cake Test'
      run: 'dotnet cake --target=Test'
      shell: pwsh
      #failOnStderr: true
    - name: 'Dotnet Cake Pack'
      run: 'dotnet cake --target=Pack'
      shell: pwsh
      #failOnStderr: true
    #- task: PublishTestResults@2
    #  displayName: 'Publish Test Results'
    #  inputs:
    #    testResultsFormat: 'VSTest'
    #    testResultsFiles: '**/*.trx'
    #- publish: './Artefacts'
    #  artifact: $(matrixName)
    #  displayName: 'Publish Artefacts'

Add dotnet opt out environment variables
Add dotnet opt out environment variables