-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (35 loc) · 1.3 KB
/
template.yml
File metadata and controls
46 lines (35 loc) · 1.3 KB
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
name: Template
on:
pull_request:
push:
branches:
- main
jobs:
template:
name: Verify template output
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
- name: Pack template
run: dotnet pack CleanApiStarter.Template.csproj --configuration Release --output artifacts
- name: Install template
run: dotnet new install artifacts/CleanApiStarter.Template.0.0.0.nupkg --force
- name: Create sample
run: dotnet new clean-api-starter -n DemoProduct -o artifacts/DemoProduct
- name: Restore sample
working-directory: artifacts/DemoProduct
run: dotnet restore DemoProduct.slnx
- name: Format sample
working-directory: artifacts/DemoProduct
run: dotnet format DemoProduct.slnx --verify-no-changes --no-restore
- name: Build sample
working-directory: artifacts/DemoProduct
run: dotnet build DemoProduct.slnx --no-restore --configuration Release /nr:false -v:minimal
- name: Test sample
working-directory: artifacts/DemoProduct
run: dotnet test DemoProduct.slnx --no-build --configuration Release /nr:false -v:minimal