-
Notifications
You must be signed in to change notification settings - Fork 5
36 lines (30 loc) · 956 Bytes
/
build-project.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
name: 'build-project'
on:
push: # Push always triggers after a merge
branches:
- master
- develop
pull_request:
# Defines environment variables
env:
NETCORE_VERSION: '8.0.x'
jobs:
build:
name: 'run-project-build'
runs-on: windows-latest
steps:
# Checkout the repository
- uses: actions/checkout@v3
# Setup the .NET 8.0 SDK environment
- name: 'setup .NET SDK ${{ env.NETCORE_VERSION }}'
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.NETCORE_VERSION }}
# Restore NuGet packages to ensure dependencies are available for the build
- name: 'restore nuget packages'
working-directory: './src'
run: dotnet restore
# Build the project in Release configuration
- name: 'build project'
working-directory: './src'
run: dotnet build --configuration Release --no-restore