forked from dotpcap/packetnet
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 1.57 KB
/
dotnet-core.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
name: .NET
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Install .net dependencies
run: dotnet restore
- name: Install libpcap
run: sudo -E bash Scripts/install-libpcap.sh
- name: Build
run: dotnet build PacketDotNet/PacketDotNet.csproj --framework "netstandard2.0" -c Release
- name: Test
run: dotnet test --framework "net5.0"
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Clear NuGet cache
run: dotnet nuget locals all --clear
- name: Install .net dependencies
run: dotnet restore
- name: Install winpcap
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install winpcap
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test
- name: publish on version change
id: publish_nuget
uses: rohith/publish-nuget@v2
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: PacketDotNet/PacketDotNet.csproj
# API key to authenticate with NuGet server
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
INCLUDE_SYMBOLS: true