-
Notifications
You must be signed in to change notification settings - Fork 8
50 lines (38 loc) · 1.18 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
name: .NET
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest
env:
Configuration: Release
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
working-directory: ./src
- name: Build
run: dotnet build --no-restore --configuration $env:Configuration
working-directory: ./src
- name: Test
run: dotnet test --no-build --configuration $env:Configuration --verbosity normal
working-directory: ./src
# Unfortunately, --no-build does not seem to work when we publish a specific project, so we use --no-restore instead
- name: Publish
run: dotnet publish FlaUI.WebDriver/FlaUI.WebDriver.csproj --no-restore --configuration $env:Configuration --self-contained
working-directory: ./src
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: package
path: ./src/FlaUI.WebDriver/bin/Release/win-x64/publish