Skip to content

Commit 3ddb537

Browse files
authored
fix: Only allow publish/release on push
Signed-off-by: Martin Stühmer <me@samtrion.net>
1 parent 8524dc9 commit 3ddb537

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/cicd-dotnet.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146

147147
publish-nuget:
148148
name: Publish NuGet
149-
if: ${{ inputs.disablePublish == false && github.actor != 'dependabot[bot]' }}
149+
if: ${{ inputs.disablePublish == false && github.event_name == 'push' && github.actor != 'dependabot[bot]' }}
150150
uses: ./.github/workflows/step-dotnet-publish-nuget.yml
151151
needs:
152152
- build
@@ -155,7 +155,7 @@ jobs:
155155

156156
release:
157157
name: Release
158-
if: ${{ inputs.disablePublish == false && github.actor != 'dependabot[bot]' }}
158+
if: ${{ inputs.disablePublish == false && github.event_name == 'push' && github.actor != 'dependabot[bot]' }}
159159
needs:
160160
- version
161161
- build

0 commit comments

Comments
 (0)