Skip to content

Commit 0a4c496

Browse files
committed
chore: only run release on push and in the right branch
1 parent 2e0e059 commit 0a4c496

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/validate.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ jobs:
2828
uses: codecov/codecov-action@v1
2929

3030
release:
31-
runs-on: ubuntu-latest
3231
needs: main
32+
runs-on: ubuntu-latest
33+
if:
34+
${{ contains('master,beta,next,alpha', github.base_ref) &&
35+
github.event_name == 'push' }}
3336
steps:
3437
- name: ⬇️ Checkout repo
3538
uses: actions/checkout@v2
@@ -54,10 +57,10 @@ jobs:
5457
branches: |
5558
[
5659
'+([0-9])?(.{+([0-9]),x}).x',
57-
'master',
58-
'next',
59-
'next-major',
60-
{name: 'beta', prerelease: true},
60+
'master',
61+
'next',
62+
'next-major',
63+
{name: 'beta', prerelease: true},
6164
{name: 'alpha', prerelease: true}
6265
]
6366
env:

0 commit comments

Comments
 (0)