-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (47 loc) · 1.32 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
name: Build Executables
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# Handle Linux x64
- os: ubuntu-latest
runtime: linux-x64
arch: x64
# Handle Windows x64
- os: windows-latest
runtime: win-x64
arch: x64
# Handle Windows x86
- os: windows-latest
runtime: win-x86
arch: x86
# Handle macOS x64
- os: macos-latest
runtime: osx-x64
arch: x64
steps:
- name: Checkout source cod
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x' # Specify the required .NET SDK version
- name: Install dependencies
run: dotnet restore
- name: Publish executable
run: dotnet publish -c Release -r ${{ matrix.runtime }} --self-contained -p:PublishSingleFile=true -o ./publish/${{ matrix.os }}/${{ matrix.arch }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}
path: ./publish/${{ matrix.os }}/${{ matrix.arch }}