Skip to content

Commit

Permalink
Updates the actions to use v3 and target the new .net version
Browse files Browse the repository at this point in the history
  • Loading branch information
AKruimink committed Sep 5, 2024
1 parent cc99bfb commit 8df933e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
name: 'build-project'

on:
push: #Push always triggers after a merge
push: # Push always triggers after a merge
branches:
- master
- develop
pull_request:

# Defines environment variables
env:
NETCORE_VERSION: '3.1.200'
NETCORE_VERSION: '8.0.x'

jobs:
build:
name: 'run-project-build'
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
# Checkout the repository
- uses: actions/checkout@v3

#Setup the environment
- name: 'setup .NET Core SDK ${{ env.NETCORE_VERSION }}'
uses: actions/setup-dotnet@v1
# 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 all nuget packages to prevent issues during build
# Restore NuGet packages to ensure dependencies are available for the build
- name: 'restore nuget packages'
working-directory: './src'
run: dotnet restore

# Build the project
# Build the project in Release configuration
- name: 'build project'
working-directory: './src'
run: dotnet build --configuration Release --no-restore
15 changes: 8 additions & 7 deletions .github/workflows/test-project.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
name: 'test-project'

on:
push: #Push always triggers after a merge
push: # Push always triggers after a merge
branches:
- master
- develop
pull_request:

# Defines environment variables
env:
NETCORE_VERSION: '3.1.200'
NETCORE_VERSION: '8.0.x'

jobs:
build:
name: 'run-unit-tests'
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
# Checkout the repository
- uses: actions/checkout@v3

#Setup the environment
- name: 'setup .NET Core SDK ${{ env.NETCORE_VERSION }}'
uses: actions/setup-dotnet@v1
# 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 all nuget packages to prevent issues during build
# Restore all NuGet packages to ensure dependencies are available
- name: 'restore nuget packages'
working-directory: './src'
run: dotnet restore
Expand Down

0 comments on commit 8df933e

Please sign in to comment.