-
Notifications
You must be signed in to change notification settings - Fork 10
62 lines (54 loc) · 1.7 KB
/
build.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
name: "Build"
on:
workflow_call:
inputs:
dotnet_version:
required: true
type: string
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
# By default they are no "main build" but if it matches "os" then yes.
- os: ubuntu-latest
is_main_build: true
name: "${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0 # We need full history for version number
- name: "Setup .NET SDK"
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ inputs.dotnet_version }}
- name: "Setup .NET 6.0 SDK"
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.424'
- name: "Build and test"
run: dotnet run --project build/orchestrator -- --target=Default --dotnet-configuration=Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Bundle"
if: ${{ matrix.is_main_build }}
run: dotnet run --project build/orchestrator -- --target=Bundle --dotnet-configuration=Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Publish artifacts to CI"
if: ${{ matrix.is_main_build }}
uses: actions/upload-artifact@v4
with:
name: "Artifacts"
retention-days: 7
path: |
build/artifacts/
!build/artifacts/docs
- name: Publish docs artifact to CI
if: ${{ matrix.is_main_build }}
uses: actions/upload-pages-artifact@v3
with:
path: build/artifacts/docs