-
Notifications
You must be signed in to change notification settings - Fork 7
52 lines (45 loc) · 1.6 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
name: Build project
on:
push:
branches: [master, dev]
pull_request:
branches: [master, dev]
workflow_dispatch:
jobs:
build:
name: Build ${{ matrix.projectPath }} for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- Blocktest
- DedicatedServer
targetPlatform:
- linux-x64 # Build a macOS standalone (Intel 64-bit).
- win-x86 # Build a Windows 32-bit standalone.
- win-x64 # Build a Windows 64-bit standalone.
- osx-x64 # Build a Linux 64-bit standalone.
dotnet:
- 8.x
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
${{ matrix.dotnet }}
3.1.x
cache: true
cache-dependency-path: Blocktest/packages.lock.json
- name: Describe Version
id: desc
uses: proudust/gh-describe@v2
- name: Build
run: dotnet publish ${{ matrix.projectPath }} --configuration Release --runtime ${{ matrix.targetPlatform }} -p:PublishReadyToRun=false -p:TieredCompilation=false -p:PublishSingleFile=true -p:Version=${{ steps.desc.outputs.describe }} --self-contained false --output ./Build/${{ matrix.targetPlatform }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.projectPath }}-${{ steps.desc.outputs.describe }}-${{ matrix.targetPlatform }}
path: ./Build/${{ matrix.targetPlatform }}
compression-level: 0