Skip to content

Commit 027bb4e

Browse files
committed
fix: update semantic-release workflow to trigger on push events and merged PRs
1 parent fe7a905 commit 027bb4e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/semantic-release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: semantic-release
22
on:
33
workflow_dispatch:
44
push:
5+
# Only trigger on merged PRs, not on every PR push
6+
pull_request:
7+
types: [closed]
58
branches:
69
- main
710

@@ -13,6 +16,8 @@ jobs:
1316
semantic-release:
1417
name: semantic-release
1518
runs-on: ubuntu-latest
19+
# Only run on push to main, manual dispatch, or when PR is merged
20+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
1621
outputs:
1722
new-release-published: ${{ steps.semantic-release.outputs.new-release-published }}
1823
new-release-version: ${{ steps.semantic-release.outputs.new-release-version }}

0 commit comments

Comments
 (0)