-
Notifications
You must be signed in to change notification settings - Fork 230
130 lines (99 loc) · 4.3 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: GitHub CI
on:
push:
paths-ignore:
- '**.md'
- '**.yml'
branches:
- master
pull_request:
branches:
- master
release:
types:
- released
workflow_dispatch:
env:
CI_REQ_DOTNET_SDK_VER: 6.0.x
jobs:
build:
name: Build NETReactorSlayer
runs-on: windows-latest
defaults:
run:
shell: pwsh
strategy:
matrix:
platform: [netframework, net6.0-win32, net6.0-win64, net6.0-win-arm, net6.0-win-arm64, net6.0-linux64, net6.0-linux-arm, net6.0-linux-arm64, net6.0-osx64, netcoreapp3.1-win32, netcoreapp3.1-win64, netcoreapp3.1-win-arm, netcoreapp3.1-win-arm64, netcoreapp3.1-linux64, netcoreapp3.1-linux-arm, netcoreapp3.1-linux-arm64, netcoreapp3.1-osx64]
include:
- platform: netframework
build-dir: net48
- platform: net6.0-win32
build-dir: net6.0\win-x86\publish
- platform: net6.0-win64
build-dir: net6.0\win-x64\publish
- platform: net6.0-win-arm
build-dir: net6.0\win-arm\publish
- platform: net6.0-win-arm64
build-dir: net6.0\win-arm64\publish
- platform: net6.0-linux64
build-dir: net6.0\linux-x64\publish
- platform: net6.0-linux-arm
build-dir: net6.0\linux-arm\publish
- platform: net6.0-linux-arm64
build-dir: net6.0\linux-arm64\publish
- platform: net6.0-osx64
build-dir: net6.0\osx-x64\publish
- platform: netcoreapp3.1-win32
build-dir: netcoreapp3.1\win-x86\publish
- platform: netcoreapp3.1-win64
build-dir: netcoreapp3.1\win-x64\publish
- platform: netcoreapp3.1-win-arm
build-dir: netcoreapp3.1\win-arm\publish
- platform: netcoreapp3.1-win-arm64
build-dir: netcoreapp3.1\win-arm64\publish
- platform: netcoreapp3.1-linux64
build-dir: netcoreapp3.1\linux-x64\publish
- platform: netcoreapp3.1-linux-arm
build-dir: netcoreapp3.1\linux-arm\publish
- platform: netcoreapp3.1-linux-arm64
build-dir: netcoreapp3.1\linux-arm64\publish
- platform: netcoreapp3.1-osx64
build-dir: netcoreapp3.1\osx-x64\publish
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{env.CI_REQ_DOTNET_SDK_VER}}
- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Restore NuGet packages for NETReactorSlayer.GUI
run: nuget restore NETReactorSlayer.GUI\NETReactorSlayer.GUI.csproj -PackagesDirectory .\packages\
if: ${{ contains(matrix.platform, 'netframework') }}
- name: Build ${{matrix.platform}}
run: .\build.ps1 ${{matrix.platform}}
- name: Create output directory
run: New-Item -ItemType Directory -Path C:\builtfiles\NETReactorSlayer-${{matrix.platform}} -Force > $null
continue-on-error: true
- name: Copy release files for upload
run: Copy-Item -Path bin\Release\${{matrix.build-dir}}\* -Destination C:\builtfiles\NETReactorSlayer-${{matrix.platform}} -Recurse
- name: Upload NETReactorSlayer
uses: actions/upload-artifact@v4
if: ${{ contains(matrix.platform, 'netframework') && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) }}
with:
name: NETReactorSlayer-${{matrix.platform}}
path: C:\builtfiles\NETReactorSlayer-${{matrix.platform}}
if-no-files-found: error
- name: Upload NETReactorSlayer.CLI
uses: actions/upload-artifact@v4
if: ${{ !contains(matrix.platform, 'netframework') && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))}}
with:
name: NETReactorSlayer.CLI-${{matrix.platform}}
path: C:\builtfiles\NETReactorSlayer-${{matrix.platform}}
if-no-files-found: error