-
Notifications
You must be signed in to change notification settings - Fork 2.4k
82 lines (69 loc) · 3.04 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: DotNet Build
on: [push, workflow_dispatch, pull_request]
jobs:
build:
name: Build Release
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 10
- 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 } }
copy version.txt ..\..\..\
7z a -tzip ..\..\..\MissionPlannerBeta.zip *
cd ..
.\md5sum.exe net461 > ..\..\checksums.txt
- uses: actions/upload-artifact@v4
with:
name: MissionPlannerBeta
path: bin\Release\net461
- uses: "marvinpinto/[email protected]"
if: ${{ github.ref == 'refs/tags/beta' }}
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "betarelease"
prerelease: true
title: "Beta Build"
files: |
MissionPlannerBeta.zip
checksums.txt
version.txt
ChangeLog.txt
buildDebug:
name: Build Debug
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 10
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: |
**/obj/**
key: ${{ runner.os }}-buildDebug
- 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 } }