-
-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (46 loc) · 1.65 KB
/
dotnet.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
name: build
on:
push:
branches:
- main
- release-*
pull_request:
branches: [ main ]
paths:
- '**.cs'
- '**.csproj'
env:
DOTNET_VERSION: '6.0.x' # The .NET SDK version to use
jobs:
build:
name: build-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: |
dotnet restore PuppeteerSharp.Dom.sln
dotnet dev-certs https -ep PuppeteerSharp.Dom.TestServer/testCert.cer
sudo openssl x509 -inform der -in PuppeteerSharp.Dom.TestServer/testCert.cer -out /usr/local/share/ca-certificates/testCert.crt -outform pem
sudo update-ca-certificates
- name: Build
run: |
echo "Buid version is 3.0.${{github.run_number}}"
dotnet build PuppeteerSharp.Dom.sln /p:Version=3.0.${{github.run_number}} --configuration Release
- name: Test
run: |
Xvfb :1 -screen 5 1024x768x8 &
export DISPLAY=:1.5
cd PuppeteerSharp.Dom.Tests
dotnet test -f net5.0 -s test.runsettings -c Debug --logger "trx;LogFileName=TestResults.xml"
- name: Publish Nuget packages
run: |
dotnet nuget push PuppeteerSharp.Dom/bin/Release/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/ChromiumDotNet/index.json
dotnet nuget push PuppeteerSharp.Dom/bin/Release/*.nupkg -k ${{ secrets.PuppeteerSharpDom }} -s https://www.myget.org/F/cefsharp/api/v3/index.json