Skip to content

Commit b35c2dd

Browse files
feat: add input to dotnet lib release workflow to optionally build
1 parent 3ad36cc commit b35c2dd

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/dotnet-lib-release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ on:
3535
required: true
3636
description: The version of Deno to use. The deno platform is used in all of the composite actions used in this workflow.
3737
type: string
38+
build-project:
39+
required: false
40+
description: If true, builds the project to ensure it compiles before performing the release.
41+
default: true
42+
type: boolean
3843
enable-deno-cache:
3944
required: false
4045
description: If true, enables caching of the Deno modules.
@@ -234,14 +239,18 @@ jobs:
234239
name: Build Main Project
235240
runs-on: "${{ inputs.runs-on }}"
236241
steps:
237-
- uses: actions/checkout@v5
242+
- name: Checkout Repository
243+
if: inputs.build-project == true
244+
uses: actions/checkout@v5
238245

239246
- name: Set Up .NET SDK (${{ inputs.net-sdk-version }})
247+
if: inputs.build-project == true
240248
uses: actions/setup-dotnet@v5
241249
with:
242250
dotnet-version: ${{ inputs.net-sdk-version }}
243251

244252
- name: Run Build
253+
if: inputs.build-project == true
245254
run: dotnet build "${{ github.workspace }}/${{ inputs.project-name }}/${{ inputs.project-name }}.csproj" -c ${{ inputs.build-config }};
246255

247256

0 commit comments

Comments
 (0)