Skip to content

Commit d16057e

Browse files
committed
Require tests to pass before release or publish
1 parent 76ec23c commit d16057e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
jobs:
1212
publish:
1313
runs-on: ubuntu-latest
14+
# Require tests to pass before publish
15+
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
16+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1417
steps:
1518
- name: Checkout
1619
uses: actions/checkout@v4

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
13+
# Require tests to pass before release
14+
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
15+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1316
steps:
1417
- name: Checkout
1518
uses: actions/checkout@v4

0 commit comments

Comments
 (0)