forked from ArduPilot/MissionPlanner
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 2.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
49
50
51
52
53
54
name: DotNet Build
on: push
jobs:
build:
name: Build Release
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build
shell: pwsh
run: |
$msbuildPath = Split-Path (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild\Current\Bin\amd64\MSBuild.exe | Select-Object -First 1) -Parent
$env:PATH = $msbuildPath + ';' + $env:PATH
nuget locals all -clear
msbuild -v:m -restore -t:Build -p:Configuration=Release MissionPlanner.sln
- name: Cleanup
shell: pwsh
run: |
cd bin\Release\net461
gci plugins | ForEach-Object { if (Test-Path $_.Name -PathType Leaf) { Write-Host "Remove" $_.FullName ; Remove-Item $_.FullName } else { Write-Host $_.Name } }
- uses: actions/upload-artifact@v1
with:
name: MissionPlannerBeta
path: bin\Release\net461
buildDebug:
name: Build Debug
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build
shell: pwsh
run: |
$msbuildPath = Split-Path (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild\Current\Bin\amd64\MSBuild.exe | Select-Object -First 1) -Parent
$env:PATH = $msbuildPath + ';' + $env:PATH
nuget locals all -clear
msbuild -v:m -restore -t:Build -p:Configuration=Debug MissionPlanner.sln
- name: Cleanup
shell: pwsh
run: |
cd bin\Debug\net461
gci plugins | ForEach-Object { if (Test-Path $_.Name -PathType Leaf) { Write-Host "Remove" $_.FullName ; Remove-Item $_.FullName } else { Write-Host $_.Name } }