Skip to content

Commit 206fd02

Browse files
committed
CI: Limit publishing steps to master branch
1 parent b275cb1 commit 206fd02

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: Build
22

33
on:
44
push:
5-
branches:
6-
- master
5+
branches: [master]
76
pull_request: {}
87
merge_group: {}
98

@@ -41,6 +40,7 @@ jobs:
4140
git fetch --unshallow
4241
make -j2 duke3d sw blood rr exhumed kenbuild tools SDLCONFIG= ${{matrix.opt}}
4342
- name: prepare artifacts
43+
if: github.ref == 'refs/heads/master'
4444
run: |
4545
mkdir -p upload/nblood/
4646
mkdir -p upload/rednukem/
@@ -49,6 +49,7 @@ jobs:
4949
cp rednukem.exe upload/rednukem/
5050
cp pcexhumed.exe upload/pcexhumed/
5151
- uses: actions/upload-artifact@v2
52+
if: github.ref == 'refs/heads/master'
5253
with:
5354
name: ${{matrix.label}}
5455
path: upload/

.github/workflows/publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ name: Publish
22

33
# Only trigger, when the build workflow succeeded
44
on:
5-
workflow_dispatch:
65
workflow_run:
76
workflows: [Build]
8-
types:
9-
- completed
7+
types: [completed]
8+
branches: [master]
109

1110
jobs:
1211
release:

0 commit comments

Comments
 (0)