-
-
Notifications
You must be signed in to change notification settings - Fork 37
69 lines (59 loc) · 1.93 KB
/
dotnet.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
65
66
67
68
69
name: .NET
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
inputs:
categories:
description: Categories to run
type: string
required: false
publish-packages:
description: Publish packages?
type: boolean
required: true
jobs:
modularpipeline:
environment: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Pull Requests' }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build .NET 8
run: dotnet build -c Release -p:TreatWarningsAsErrors=true -p:SDK_VERSION=net8
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Build .NET 9
run: dotnet build -c Release -p:TreatWarningsAsErrors=true -p:SDK_VERSION=net9
- name: Run Pipeline
uses: ./.github/actions/execute-pipeline
with:
admin-token: ${{ secrets.ADMIN_TOKEN }}
environment: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Development' }}
nuget-apikey: ${{ secrets.NUGET__APIKEY }}
publish-packages: ${{ (github.event.inputs.publish-packages || false) && matrix.os == 'ubuntu-latest' }}
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.4.3
if: always()
with:
name: TestingPlatformDiagnosticLogs${{matrix.os}}
path: '**/log_*.diag'
- name: NuGet Packages Artifacts
uses: actions/upload-artifact@v4.4.3
if: always()
with:
name: 'NuGetPackages-${{matrix.os}}'
path: '**/*.*nupkg'