-
Notifications
You must be signed in to change notification settings - Fork 88
39 lines (37 loc) · 1.22 KB
/
ci.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
name: MockHttp Build
on:
push:
branches: [ master, release/7.0.0 ]
pull_request:
workflow_dispatch:
jobs:
build:
name: "Build"
runs-on: ${{ matrix.os }}
env:
DOTNET_NOLOGO: true
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore ./RichardSzalay.MockHttp.sln
- name: Build
run: dotnet build -c Release --no-restore ./RichardSzalay.MockHttp.sln
- name: Test
run: dotnet test -c Release --no-build --verbosity normal ./RichardSzalay.MockHttp.sln
- name: Package
run: dotnet pack -c Release --no-build ./RichardSzalay.MockHttp/RichardSzalay.MockHttp.csproj
if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest'
- name: "Upload artifact: RichardSzalay.MockHttp.nupkg"
uses: actions/[email protected]
with:
name: RichardSzalay.MockHttp.nupkg
path: RichardSzalay.MockHttp/bin/Release/*.nupkg
if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest'