Skip to content

Commit 17dc1d9

Browse files
Run release only when tag pushed into main branch
1 parent 9f3fbad commit 17dc1d9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/release.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
name: Upload Release Asset
2+
13
on:
24
push:
3-
branches:
4-
- master
55
tags:
66
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
77

8-
name: Upload Release Asset
9-
108
jobs:
11-
build:
9+
release:
10+
# There is no way to run a workflow on push tags on a specific branch.
11+
# The job should be skipped when running for a non-master branch.
12+
if: github.event.base_ref == 'refs/heads/master'
1213
name: Upload Release Asset
1314
runs-on: ubuntu-latest
1415
steps:

0 commit comments

Comments
 (0)