-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (37 loc) · 1.2 KB
/
main.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
name: Build and Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
6.0.x
- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v1
- name: Restore
run: nuget restore G2O.sln
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Build .Net Framework
run: msbuild $Env:GITHUB_WORKSPACE\G2O.sln /p:Configuration=net48-release /p:Platform=x64
- name: Build .Net Core
run: msbuild $Env:GITHUB_WORKSPACE\G2O.sln /p:Configuration=netcoreapp31-release /p:Platform=x64
- name: Build .Net 6.0
run: msbuild $Env:GITHUB_WORKSPACE\G2O.sln /p:Configuration=net6-release /p:Platform=x64
- name: Test .Net 6.0
run: dotnet test $Env:GITHUB_WORKSPACE\Fugro\Test\bin\net6-release\net6.0\Fugro.G2O.Test.dll
- name: Pack
run: nuget pack $Env:GITHUB_WORKSPACE\Fugro\G2O\Fugro.G2O.nuspec
- name: Publish
uses: actions/upload-artifact@v2
with:
name: package
path: .\*.nupkg