From 487a1f56e875b82e0fafbfbe2969e04f92191fc6 Mon Sep 17 00:00:00 2001 From: Gurpreet Singh Date: Wed, 15 Oct 2025 19:41:08 +0100 Subject: [PATCH 1/2] Add input option for NuGet publishing in workflow --- .github/workflows/build.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 440746e..8aedf36 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,15 @@ on: push: pull_request: workflow_dispatch: + inputs: + runPublish: + description: 'Publish Nuget ?' + required: true + default: 'false' + type: choice + options: + - 'true' + - 'false' jobs: build: @@ -133,7 +142,7 @@ jobs: publish-nuget: runs-on: ubuntu-latest needs: build - if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch + if: github.event.inputs.runPublish == 'true' && github.ref_name == github.event.repository.default_branch environment: name: Publish url: https://www.nuget.org/packages/TestStack.BDDfy/ @@ -206,4 +215,4 @@ jobs: --notes-file release-notes.md \ --generate-notes env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 52ecd48c5116f0eb05f5948cf94bf025bfe67227 Mon Sep 17 00:00:00 2001 From: Gurpreet Singh Date: Wed, 15 Oct 2025 19:48:39 +0100 Subject: [PATCH 2/2] Change publish option type to boolean in build.yml --- .github/workflows/build.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8aedf36..73e514c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,10 +8,7 @@ on: description: 'Publish Nuget ?' required: true default: 'false' - type: choice - options: - - 'true' - - 'false' + type: boolean jobs: build: