Skip to content

Commit c7bd0a9

Browse files
committed
Fix branch filtering in the prepublish workflow (#188 #238)
Gratefully using the solution from devmasx/merge-branch#11 (comment)
1 parent 5996e43 commit c7bd0a9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/prepublish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ name: Prepublication staging
77
on:
88
pull_request:
99
types: [labeled]
10-
branches:
11-
- release/*
12-
- hotfix/*
10+
# Would filter by branch here, but GH Actions wrongly decides not to
11+
# trigger the workflow if we do this.
1312

1413
jobs:
1514
stage:
1615
runs-on: ubuntu-latest
16+
# Filtering by branch here instead. Credit due to @MiguelSavignano.
17+
# https://github.com/devmasx/merge-branch/issues/11
18+
if: contains(github.ref, 'refs/release/') || contains(github.ref, 'refs/hotfix/')
1719
steps:
1820
- uses: actions/checkout@v2
1921
- name: Merge into prepublish

0 commit comments

Comments
 (0)