-
-
Notifications
You must be signed in to change notification settings - Fork 124
50 lines (40 loc) · 1.55 KB
/
build-winx64.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
name: Build - Win x64
on:
push:
branches: [ master ]
pull_request_review:
types: [ submitted ]
jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]
# We *only* want to run this if a collaborator or owner of the repo approves a pull request, or if something is merged into the main branch
if: ${{ github.event.ref == 'refs/heads/master' || (github.event.review.state == 'approved' && (github.event.review.author_association == 'COLLABORATOR' || github.event.review.author_association == 'OWNER')) }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0 # can't shallowly clone due to git versioning
- name: Clear output directory in DSP files
# We use SilentlyContinue here because it errors out if the folder does not exist otherwise
run: rm -R -ErrorAction SilentlyContinue "dist"
- name: Add remote build identifier
run: New-Item -Name .remoteBuild -ItemType File -force
# Add dotnet to the PATH: https://github.com/actions/setup-dotnet
- name: Setup dotnet.exe
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
# Build it
- name: Build the application
run: dotnet build -c ${{ matrix.configuration }}
# Upload it to the run results
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
# Artifact name
name: build-artifacts-${{ matrix.configuration }}
path: dist\release