-
-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (51 loc) · 2.08 KB
/
build.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
name: CI
on:
push:
branches:
# Only run on branch push, not tag push
- '**'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Setup msbuild
uses: microsoft/setup-msbuild@v1
- name: Setup nuget
uses: nuget/setup-nuget@v1
- name: Nuget restore
run: nuget restore HSPI_WX200MultiStatus.sln
- name: Generate assembly version
uses: DoctorMcKay/action-csharp-majoryearweekbuild-version@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: MSBuild
run: |
msbuild /p:Configuration=Debug HSPI_WX200MultiStatus.sln
msbuild /p:Configuration=Release HSPI_WX200MultiStatus.sln
- name: Stage artifacts
run: |
mkdir artifacts
cp HSPI_WX200MultiStatus\bin\Release\HSPI_WX200MultiStatus.exe artifacts\HSPI_WX200MultiStatus.exe
cp HSPI_WX200MultiStatus\bin\Release\HSPI_WX200MultiStatus.exe.config artifacts\HSPI_WX200MultiStatus.exe.config
cp HSPI_WX200MultiStatus\bin\Release\*.dll artifacts
cp install.txt artifacts\install.txt
$release_version = (Get-ChildItem -Filter "artifacts\HSPI_WX200MultiStatus.exe" | Select-Object -ExpandProperty VersionInfo).FileVersion.Replace('.', '-')
echo "release_version=$release_version"
echo "release_version=$release_version" >> $env:GITHUB_ENV
- name: Stage debug artifacts
run: |
mkdir artifacts-debug
cp HSPI_WX200MultiStatus\bin\Debug\HSPI_WX200MultiStatus.exe artifacts-debug\HSPI_WX200MultiStatus.exe
cp HSPI_WX200MultiStatus\bin\Debug\HSPI_WX200MultiStatus.exe.config artifacts-debug\HSPI_WX200MultiStatus.exe.config
cp HSPI_WX200MultiStatus\bin\Debug\*.dll artifacts-debug
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: WX200MultiStatus_${{ env.release_version }}
path: artifacts
- name: Upload debug artifacts
uses: actions/upload-artifact@v3
with:
name: Debug Build
path: artifacts-debug