-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (81 loc) · 2.76 KB
/
pr-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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: PR-Build
on:
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-13 ]
env:
src-directory: ./src
# CODCOV
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout the repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Fetch all tags and branches
run: git fetch --prune --unshallow
# .net Core setup
- name: Setup .NET Core 2.1
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4
with:
dotnet-version: 2.1
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4
with:
dotnet-version: 3.1
- name: Setup .NET 5.x
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4
with:
dotnet-version: 5.x
- name: Setup .NET 6.x
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4
with:
dotnet-version: 6.x
- name: Setup .NET 8.x
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4
with:
dotnet-version: 8.x
- name: Use Node.js 20
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
with:
node-version: 20
# Caching Tools
- name: Cache Tools
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
# Build
- name: Build Project
uses: cake-build/cake-action@v2
with:
script-path: recipe.cake
target: CI
verbosity: Verbose
cake-version: 1.3.0
cake-bootstrap: true
# Publish
- name: Publish Issues-Report as build artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: matrix.os == 'windows-latest'
with:
if-no-files-found: warn
name: Issue Report
path: BuildArtifacts/report.html
- name: Publish NuGet package as build artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: matrix.os == 'ubuntu-22.04'
with:
if-no-files-found: warn
name: NuGet Package
path: BuildArtifacts/Packages/**/*
- name: Publish coverage artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: matrix.os == 'ubuntu-22.04'
with:
if-no-files-found: warn
name: Coverage
path: BuildArtifacts/TestCoverage/coverlet/*.xml