-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (52 loc) · 1.54 KB
/
main.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
60
61
62
63
64
name: Main build
on:
workflow_dispatch: # Allow running the workflow manually from the GitHub UI
push:
branches:
- master
workflow_call: # Allow to be called from the release workflow
permissions:
contents: read
actions: read
checks: write
jobs:
build:
strategy:
matrix:
os: [windows-2022, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: ./global.json
- name: NuGet Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release /bl:./artifacts/logs/release/build.release.binlog
- name: Test
run: dotnet test --no-build --configuration Release
- name: Publish Test Report
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: .NET Test Reports (${{ matrix.os }})
path: "artifacts/TestResults/**/*.trx"
if-no-files-found: error
- name: Upload binlogs
uses: actions/upload-artifact@v4
with:
name: binlogs-${{ matrix.os }}
path: ./artifacts/logs
if-no-files-found: error
# TODO: Wire up building packages. Tracked by #13.
# - name: Upload packages
# uses: actions/upload-artifact@v4
# with:
# name: packages-${{ matrix.os }}
# path: |
# ./artifacts/package
# if-no-files-found: error