Skip to content

Commit fa36cb1

Browse files
committed
fix: restrict release workflow to release/* branches only
Add branch check to ensure release workflow only runs for PRs from release/* branches. This prevents unintended releases from other branches merged to master.
1 parent 2b0d787 commit fa36cb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
outputs:
1616
EXISTS_TAG: ${{ steps.tag_check.outputs.EXISTS_TAG }}
17-
if: github.event.pull_request.merged == true
17+
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0

0 commit comments

Comments
 (0)