Skip to content

Fixing the build actions #1

Fixing the build actions

Fixing the build actions #1

Workflow file for this run

name: .Net Build
description: Builds a .NET solution or project
branding:
color: green
icon: check
inputs:
build-args:
description: Additional build arguments to pass to 'dotnet build'.
required: false
build-configuration:
description: The build configuration to use (defaults to 'Release').
required: false
default: Release
path:
description: The path to the project or solution to build (defaults to the current directory).
required: false
default: .
warnings-as-errors:
description: Whether to treat warnings as errors.
required: false
default: 'false'
runs:
using: composite
steps:
- name: Restore Nuget packages
uses: EasyDesk/action-dotnet@v1
with:
script: dotnet restore '${{ inputs.path }}'
- name: Build Solution
uses: EasyDesk/action-dotnet@v1
with:
script: |
ARGS='${{ inputs.build-args }}'
if [[ '${{ inputs.warnings-as-errors }}' == 'true' ]] ; then
ARGS="-warnaserror $ARGS"
fi
dotnet build '${{ inputs.path }}' -c '${{ inputs.build-configuration }}' --no-restore $ARGS