-
-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (43 loc) · 1.47 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
name: Build Package
on: push
defaults:
run:
working-directory: src
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: windows-latest
solution: Simplify.sln
tests-exclude-category: Linux
- os: ubuntu-latest
solution: Simplify.NetCore.sln
tests-exclude-category: Windows
steps:
- name: Code Checkout
uses: actions/[email protected]
- name: Install DotNet
uses: actions/setup-dotnet@v4
- name: Restore Dependencies
run: dotnet restore ${{ matrix.solution }}
- name: Build Packages
run: dotnet build ${{ matrix.solution }} --no-restore -c Release
- name: Perform Unit Testing
run: dotnet test ${{ matrix.solution }} --no-build -c Release --filter "TestCategory != Integration & TestCategory != ${{ matrix.tests-exclude-category }}" --verbosity normal
- name: Create Packages
run: dotnet pack ${{ matrix.solution }} --no-build -c Release -o ./publish
- name: Create Source Packages
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
working-directory: .
run: ./MakeSourcePackages.ps1
- name: Create packages artifact
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v4
with:
name: Packages
path: ./src/publish/