forked from bchavez/BugTrap
-
Notifications
You must be signed in to change notification settings - Fork 3
80 lines (68 loc) · 2.07 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.configuration }} ${{ matrix.platform }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
configuration:
- .NET Debug
- .NET Release
- Debug
- Release
- Debug Static
- Release Static
- Unicode Debug
- Unicode Release
- Unicode Debug Static
- Unicode Release Static
platform: [x64, Win32]
steps:
- uses: actions/checkout@main
- uses: microsoft/setup-msbuild@main
- name: Restore NuGet packages
run: nuget restore source/BugTrap.sln
- name: Build
run: msbuild /m /p:Configuration="${{ matrix.configuration }}" /p:Platform="${{ matrix.platform }}" source/BugTrap.sln
- name: Upload artifacts
uses: actions/upload-artifact@main
with:
name: BugTrap ${{ matrix.configuration }} ${{ matrix.platform }} (github-${{ github.run_number }})
path: |
include/*
bin/*.dll
bin/*.lib
bin/*.pdb
LICENSE
pack-everything:
name: Pack everything into one archive
needs: build
runs-on: windows-latest
steps:
- name: Download everything from previous jobs
uses: actions/download-artifact@v4
- name: Unify folders
run: |
for /d /r %%D in ("BugTrap*") do (
echo Moving contents of %%D to the parent directory...
rem Copy all files and directories recursively
xcopy "%%D\*" "%rootDir%\" /E /I /K /Y
rem Delete original directory
rd /s /q "%%D"
)
- name: Upload unified artifact
uses: actions/upload-artifact@main
with:
name: BugTrap (github-${{ github.run_number }})
- name: Pack shipping archive
run: 7z a BugTrap.zip *
- name: Upload manually packed shipping artifact
uses: actions/upload-artifact@main
with:
name: BugTrap
path: BugTrap.zip