Skip to content

Commit 2114937

Browse files
committed
Fix release draft trigger
The branches filter is the target, not the PR branch.
1 parent cd15862 commit 2114937

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/release.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
types:
1111
- closed
1212
branches:
13-
- "update/**"
13+
- main
1414

1515
permissions:
1616
contents: write # For creating releases.
@@ -26,7 +26,9 @@ jobs:
2626
package-linux:
2727
name: ${{ format('linux-{0}', matrix.vscode_arch) }}
2828
runs-on: ubuntu-22.04
29-
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
29+
if: >-
30+
(github.event_name == 'workflow_dispatch') ||
31+
(github.event_name == 'pull_request_target' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'update/'))
3032
3133
strategy:
3234
matrix:
@@ -133,7 +135,9 @@ jobs:
133135
package-macos:
134136
name: ${{ matrix.vscode_target }}
135137
runs-on: ${{ matrix.os }}
136-
if: github.event_name == 'workflow_dispatch' || github.event.pull_request_merged == true
138+
if: >-
139+
(github.event_name == 'workflow_dispatch') ||
140+
(github.event_name == 'pull_request_target' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'update/'))
137141
strategy:
138142
matrix:
139143
include:

0 commit comments

Comments
 (0)