-
Notifications
You must be signed in to change notification settings - Fork 652
59 lines (55 loc) · 1.23 KB
/
format.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Code Format
on:
push:
branches:
- main
- 'fix/*'
- 'feature/*'
- 'poc/*'
- 'support/*'
paths:
- '**'
- '!docs/**'
- '!.github/**'
- .github/workflows/format.yml
pull_request:
branches:
- main
- 'support/*'
paths:
- '**'
- '!docs/**'
- '!.github/**'
- .github/workflows/format.yml
permissions:
contents: read
env:
DOTNET_ROLL_FORWARD: "Major"
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
jobs:
format:
runs-on: ubuntu-latest
name: DotNet Format
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
-
name: Run Format 'ci' solution
run: dotnet format ./build/ --verify-no-changes
-
name: Build 'new-cli' solution
run: dotnet build ./new-cli
-
name: Run Format 'new-cli' solution
run: dotnet format ./new-cli/ --exclude ~/.nuget/packages --verify-no-changes
-
name: Run Format 'GitVersion' solution
run: dotnet format ./src/ --exclude **/AddFormats/ --verify-no-changes