diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 440746e..73e514c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,12 @@ on: push: pull_request: workflow_dispatch: + inputs: + runPublish: + description: 'Publish Nuget ?' + required: true + default: 'false' + type: boolean jobs: build: @@ -133,7 +139,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 +212,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 }}