Skip to content

Commit ceb4c9a

Browse files
fix: skip dev publish when merging release version bump PR
The existing check only matched direct pushes with 'chore: release v' commit messages. Merged PRs have 'Merge pull request ... from release/vX' as the commit message, bypassing the guard and triggering an unwanted dev publish.
1 parent 3a88b4c commit ceb4c9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
preflight:
2323
name: Preflight checks
2424
runs-on: ubuntu-latest
25-
# Skip dev publish when the push is a stable release version bump
26-
if: "${{ github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'chore: release v') }}"
25+
# Skip dev publish when the push is a stable release version bump (direct push or merged PR)
26+
if: "${{ github.event_name != 'push' || (!startsWith(github.event.head_commit.message, 'chore: release v') && !contains(github.event.head_commit.message, 'release/v')) }}"
2727
permissions:
2828
contents: read
2929
steps:

0 commit comments

Comments
 (0)