build.yml 721 B

123456789101112131415161718192021222324252627
  1. name: "Build job"
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. branches:
  8. - '*'
  9. jobs:
  10. build:
  11. runs-on: ${{ matrix.os }}
  12. strategy:
  13. matrix:
  14. os: [ubuntu-latest, macOS-latest, windows-latest]
  15. dotnet: ['3.1.100']
  16. environment: ['Debug', 'Release']
  17. name: ${{ matrix.environment }} build (Dotnet ${{ matrix.dotnet }}, OS ${{ matrix.os }})
  18. steps:
  19. - uses: actions/checkout@master
  20. - name: Setup dotnet
  21. uses: actions/setup-dotnet@v1
  22. with:
  23. dotnet-version: ${{ matrix.dotnet }}
  24. - name: Build
  25. run: dotnet build -c "${{ matrix.environment }}"
  26. - name: Test
  27. run: dotnet test -c "${{ matrix.environment }}"