-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (29 loc) · 868 Bytes
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build
on:
# Pull requests targeting main
pull_request:
branches: [ main ]
# opened: when a PR is created
# reopened: when a PR is reopened
# synchronize: when commits are pushed to an open PR
types: [opened, reopened, synchronize]
# Manually triggered
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Restore
run: dotnet restore
- name: Install Format Tool
run: dotnet tool install -g dotnet-format
- name: Check Format
run: dotnet format --verify-no-changes --verbosity diagnostic
- name: Build
run: dotnet build --no-restore -c Release --warnAsError